blaze provides a simple way to temporarily store values. blaze will create a folder 'cache' which will hold several things. If you delete this folder, also the cached keys/values will be deleted.
The caching component is available like this:
Usage of the cache component is simple, there are two functions to use.
The setter function takes two variables. One of them is
$key, which can be any string. The other one is the value to store.
$value could be a string, an integer value, a boolean value or both an associative array or a non associative array.
The getter function returns false if there is nothing stored for
If you do want to know if a key/value combination is hold in the cache, you may use this helper function:
$key is available in the cache, this function will return true, else it will return false.
To remove a stored value from cache, use this.
You can also completely wipe the cache:
Storing file contents
blaze also provides a way to store more than simple key/value combinations. Please read the file storage documentation if you need this.