GC_FILE
GC_FILE
Cache storage in the filesystem.
__construct(array $params = array())
Constructor.
| array | $params | Optional parameters:
- dir: (string) The base directory to store the cache files in.
DEFAULT: System default
- no_gc: (boolean) If true, don't perform garbage collection.
DEFAULT: false
- prefix: (string) The filename prefix to use for the cache files.
DEFAULT: 'cache_'
- sub: (integer) If non-zero, the number of subdirectories to create
to store the file (i.e. PHP's session.save_path).
DEFAULT: 0
|
set(string $key, mixed $data, integer $lifetime)
Store an object in the cache.
| string | $key | Object ID used as the caching key. |
| mixed | $data | Data to store in the cache. |
| integer | $lifetime | Object lifetime - i.e. the time before the data becomes available for garbage collection. If 0 will not be GC'd. |