class ASF::AutoGC

‘use’ the following class in config.ru to automatically run Garbage Collection every ‘n’ requests, or ‘m’ minutes.

This tries to run garbage collection “out of band” (i.e., between requests), and when other requests are active (which can happen with threaded servers like Puma).

In addition to keeping memory usage bounded, this keeps the LDAP cache from going stale.