Provides the shared abstract writer interface for the caching system. This encompasses all of the methods required for writing cache data to a variety of sources. cacheWriter instances are used within the main cacheController object.

This class requires a concrete implementation for example cacheWriterFile.


public __construct([$inCacheId = null])

Returns new instance of cache writer

public reset()

Reset controller to defaults

public abstract isCached()

Returns true if the requested object is cached already

public abstract isExpired()

Returns true if the cache has reached or exceeded the lifetime

public abstract load()

Loads the cache object into the writer

public abstract save()

Saves the data to the data destination

public abstract delete()

Deletes the cache data

public abstract runGc()

Executes garbage collection to flush the cache of the specified resource

public isModified()

Returns true if object has been modified

public setModified([$status = true])

Set the status of the object if it has been changed

public getCacheId()

Returns $_CacheId

public setCacheId($inCacheId)

Set $_CacheId to $inCacheId

public getData()

Returns $_Data and unserialises it first

public getSerialiseData()

Returns the data as the internal serialised string

public setData($inData)

Set $_Data to $inData, all data is serialised first

public setSerialiseData($inData)

Sets already serialised data into the object

public getCreateDate()

Returns $_CreateDate

public setCreateDate($inCreateDate)

Set $_CreateDate to $inCreateDate

public getUpdateDate()

Returns $_UpdateDate

public setUpdateDate($inUpdateDate)

Set $_UpdateDate to $inUpdateDate

public getLifetime()

Returns $_Lifetime

public setLifetime($inLifetime)

Set $_Lifetime to $inLifetime

<  1  >