I'm trying to avoid a "Too Many Files Open" error when writing to a DBAL cache.
I'm creating the connections via
$cache = new DoctrineDbalAdapter('sqlite:///' . $fullFilename);
and implementing a LRU cache, but the files appear to remain open. Obviously, I'm hacking here trying to figure out how to close the underlying SQLite database.
$lruCache = $caches[$lru];
$lruCache->reset();
$lruCache = null;
unset($lruCache);
$caches[$lru] = null; // make sure the file is closed
unset($caches[$lru]);
Is there a way to explicitly close it?