CacheAPC

APC-based caching class.

Version

2008.11.30

Copyright

2006-2008 LifeNexus Digital, Inc., and contributors.

License

Simplified BSD Licensehttp://opensource.org/licenses/bsd-license.php

See Also

Tarzanhttp://tarzan-aws.com
APChttp://php.net/apc

CacheAPC

Container for all APC-based cache methods.  Inherits additional methods from CacheCore.

Functions

__construct()

public function __construct($name,
$location,
$expires)

The constructor

Access

public

Parameters

namestring (Required) A name to uniquely identify the cache object.
locationstring (Required) The location to store the cache object in.  This may vary by cache method.
expiresinteger (Required) The number of seconds until a cache object is considered stale.

Returns

object Reference to the cache object.

See Also

Example Usagehttp://tarzan-aws.com/docs/examples/cachecore/cache.phps

create()

public function create($data)

Creates a new cache.

Access

public

Parameters

datamixed (Required) The data to cache.

Returns

boolean Whether the operation was successful.

See Also

Example Usagehttp://tarzan-aws.com/docs/examples/cachecore/cache.phps

read()

public function read()

Reads a cache.

Access

public

Returns

mixed Either the content of the cache object, or boolean false.

See Also

Example Usagehttp://tarzan-aws.com/docs/examples/cachecore/cache.phps

update()

public function update($data)

Updates an existing cache.

Access

public

Parameters

datamixed (Required) The data to cache.

Returns

boolean Whether the operation was successful.

See Also

Example Usagehttp://tarzan-aws.com/docs/examples/cachecore/cache.phps

delete()

public function delete()

Deletes a cache.

Access

public

Returns

boolean Whether the operation was successful.

is_expired()

public function is_expired()

Defined here, but always returns false.  APC manages it’s own expirations.

Access

public

Returns

boolean Whether the cache is expired or not.

See Also

Example Usagehttp://tarzan-aws.com/docs/examples/cachecore/cache.phps