PHP Class Gilbitron\Util\SimpleCache

By Gilbert Pellegrom http://dev7studios.com Free to use and abuse under the MIT license. http://www.opensource.org/licenses/mit-license.php
Show file Open project: gilbitron/php-simplecache Class Usage Examples

Public Properties

Property Type Description
$cache_extension Cache file extension
$cache_path Path to cache folder (with trailing /)
$cache_time Length of time to cache a file (in seconds)

Public Methods

Method Description
do_curl ( $url ) Helper function for retrieving data from url
get_cache ( $label )
get_data ( $label, $url ) This is just a functionality wrapper function
is_cached ( $label )
set_cache ( $label, $data )

Private Methods

Method Description
safe_filename ( $filename ) Helper function to validate filenames

Method Details

do_curl() public method

Helper function for retrieving data from url
public do_curl ( $url )

get_cache() public method

public get_cache ( $label )

get_data() public method

This is just a functionality wrapper function
public get_data ( $label, $url )

is_cached() public method

public is_cached ( $label )

set_cache() public method

public set_cache ( $label, $data )

Property Details

$cache_extension public property

Cache file extension
public $cache_extension

$cache_path public property

Path to cache folder (with trailing /)
public $cache_path

$cache_time public property

Length of time to cache a file (in seconds)
public $cache_time