Download the PHP package germania-kg/namespaced-cache without Composer
On this page you can find all versions of the php package germania-kg/namespaced-cache. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download germania-kg/namespaced-cache
More information about germania-kg/namespaced-cache
Files in germania-kg/namespaced-cache
Package namespaced-cache
Short Description Factory classes for namespaced PSR-6 CacheItemPools
License MIT
Informations about the package namespaced-cache
Namespaced CacheItemPool Factory
Installation
One of these libraries is required to be installed manually:
Interfaces
Factory Interface
Classes implementing the PsrCacheItemPoolFactoryInterface are callable. Their invokation method accepts a namespace string.
DefaultLifeTimeAware
Define a default lifetime for cache items. It can be used on those PSR-6 libraries that support default life times on cache item pools.
Example:
Auto-discovering
Abstract class PsrCacheItemPoolFactory provides a static autodiscover method which will create SQLite or Filesystem cache factory, depending on if SQLite being available.
This is an experimental feature.
Filesystem caches
Auto-discover Symfony Cache or Stash
Use this when migrating from one cache engine to another. It internally uses SymfonyFileCacheItemPoolFactory or StashFileCacheItemPoolFactory, whichever library is installed.
Callable class FileCacheItemPoolFactory implements PsrCacheItemPoolFactoryInterface.
Symfony Cache Component
Callable class SymfonyFileCacheItemPoolFactory extends SymfonyCacheItemPoolFactory and implements PsrCacheItemPoolFactoryInterface and DefaultLifeTimeAware:
Stash PHP Caching Library
Callable class StashFileCacheItemPoolFactory implements PsrCacheItemPoolFactoryInterface. Note that Stash caches do not provide setting default cache item lifetime.
Sqlite Caches
Auto-discover Symfony Cache or Stash
Use this when migrating from one cache engine to another. It internally uses SymfonySqliteCacheItemPoolFactory or StashSqliteCacheItemPoolFactory, whichever library is installed.
Callable class SqliteCacheItemPoolFactory implements PsrCacheItemPoolFactoryInterface.
Please note:
- Symfony/Cache requires a DSN string
- Stash/Cache requires a directory.
Symfony Cache Component
Callable class SymfonySqliteCacheItemPoolFactory extends SymfonyCacheItemPoolFactory and implements PsrCacheItemPoolFactoryInterface and DefaultLifeTimeAware.
Stash PHP Caching Library
Callable class StashSqliteCacheItemPoolFactory implements PsrCacheItemPoolFactoryInterface.
Note that Stash caches do not provide setting default cache item lifetime.