apcu_store pass ttl parameter to make cache more controlable #804
Open
Description
For example, apcu_store($this->getCacheKey($name), $definition, $this->cacheTTL);
, and add a params on \DI\ContainerBuilder::enableDefinitionCache, like \DI\ContainerBuilder::enableDefinitionCache(string $cacheNamespace = '', int $cacheTTL = 0)
.
By default, apcu will store the cache util restart the vm. and if the developers want to control the real cache ttl, they can use $builder->enableDefinitionCache('', 60 * 60);
to override it.
Metadata
Assignees
Labels
No labels