Skip to content

apcu_store pass ttl parameter to make cache more controlable #804

Open
@tourze

Description

apcu_store($this->getCacheKey($name), $definition);

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions