TwistPHP Documentation

Cache

File path: dist/twist/Core/Utilities/Cache.utility.php
Namespace: Twist\Core\Utilities
Extends: Base

Type: Utility

Cache — Cache data using a simple store and retrieve process, all cached data must be assigned a unique key. Each cache can be given a life time in seconds, when the cache expires it will no longer be returned. The default storage location used is the folder '/cache' in the document root of your site. A '.htaccess' file is placed in the cache folder to ensure all cached data is private. The cache system is instanceable, for each instance a new cache folder will be created. This makes management of cache files easier.

Example Usage

<?php
//Set the variables for the example
$strFileExtension null;

//Call the function extension with the example vars
Twist::Cache() -> extension($strFileExtension);

Method List

Method Access Returns
__constructconstructvoid
locationpublicvoid
extensionpublicvoid
writepublicvoid
readpublicvoid
removepublicvoid
createdpublicvoid
modifiedpublicvoid
expirypublicvoid
cleanpublicvoid
cleanDirectoryprotectedvoid