Cache
[ class tree: Cache ] [ index: Cache ] [ all elements ]

Class: Cache_Container_trifile

Source Location: /Cache-1.5.7/Cache/Container/trifile.php

Class Overview

Cache_Container
   |
   --Cache_Container_file
      |
      --Cache_Container_trifile

Tri-file cache.


Author(s):

Version:

  • 1.0

Methods


Inherited Variables

Inherited Methods

Class: Cache_Container_file

Cache_Container_file::Cache_Container_file()
Creates the cache directory if neccessary
Cache_Container_file::deleteDir()
Deletes a directory and all files in it.
Cache_Container_file::doGarbageCollection()
Does the recursive gc procedure, protected.
Cache_Container_file::fetch()
Cache_Container_file::flush()
Cache_Container_file::garbageCollection()
Deletes all expired files.
Cache_Container_file::getFilename()
Returns the filename for the specified id.
Cache_Container_file::idExists()
Cache_Container_file::remove()
Cache_Container_file::save()
Stores a dataset.

Class: Cache_Container

Cache_Container::decode()
Decodes the data from the storage container.
Cache_Container::encode()
Encodes the data for the storage container.
Cache_Container::fetch()
Fetches a dataset from the storage medium.
Cache_Container::flush()
Flushes the cache - removes all caches datasets from the cache.
Cache_Container::flushPreload()
Flushes the internal preload buffer.
Cache_Container::garbageCollection()
Starts the garbage collection.
Cache_Container::getAllowedOptions()
Getter to allowed Configurations Options
Cache_Container::getExpiresAbsolute()
Translates human readable/relative times in unixtime
Cache_Container::getUserdata()
Returns the userdata field of a cached data set.
Cache_Container::hasBeenSet()
Verify that a configuration option has been set
Cache_Container::idExists()
Checks if a dataset exists.
Cache_Container::isCached()
Checks if a dataset is cached.
Cache_Container::isExpired()
Checks if a dataset is expired.
Cache_Container::load()
Loads a dataset from the cache.
Cache_Container::preload()
Does a speculative preload of a dataset
Cache_Container::remove()
Removes a dataset.
Cache_Container::save()
Stores a dataset.
Cache_Container::setAllowedOptions()
Set the Allowed Parameters to Container Type
Cache_Container::setOptions()
Imports the requested datafields as object variables if allowed

Class Details

[line 36]
Tri-file cache.

This cache container stores files with no special encoding to reduce overhead. Expiration & user data are stored in seperate files, prefixed with a '.' and suffixed with '.exp' & '.dat' respectively.

See http://atomized.org/PEAR/Cache_trifile.html for more information.



[ Top ]


Method Detail

fetch   [line 45]

array fetch( string $id, string $group)

Fetch cached file.
  • Return: 1-dimensional array in the format: expiration,data,userdata

Overrides Cache_Container_file::fetch() (parent method not documented)

Parameters:

string   $id     Cache ID to fetch
string   $group     Group to fetch from

[ Top ]

save   [line 107]

boolean save( string $id, mixed $cachedata, mixed $expires, string $group, mixed $userdata)

Cache file
  • Return: true on success, false otherwise

Overrides Cache_Container_file::save() (Stores a dataset.)

Parameters:

string   $id     Cache ID
mixed   $cachedata     Data to cache
mixed   $expires     When the data expires
string   $group     Cache group to store data in
mixed   $userdata     Additional data to store

[ Top ]


Documentation generated on Thu, 15 Sep 2011 07:00:07 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.