PHP Interface IStorage, HamlPHP

Show file Open project: hamlphp/hamlphp Interface Usage Examples

Public Methods

Method Description
cache ( $id, $content ) Cache contents and index it under the specified id.
fetch ( $id ) Returns content from a cache.
generateContentId ( string $content ) The content to generate the id for.
isFresh ( $id ) Returns true if content is fresh and false if content should be cached.
remove ( $id ) Remove cached content.

Method Details

cache() public method

Cache contents and index it under the specified id.
public cache ( $id, $content )

fetch() public method

Returns content from a cache.
public fetch ( $id )

generateContentId() public method

The content to generate the id for.
public generateContentId ( string $content )
$content string

isFresh() public method

Returns true if content is fresh and false if content should be cached.
public isFresh ( $id )

remove() public method

Remove cached content.
public remove ( $id )