Overview
The containers are the classes that handle the storage of the data. The cache system will pass them a size when they are instantiated, and they know at that point that the cache will have at maximum that many entries in it. The container must be able to support that many entries. If not, then it should throw an exception. It should also throw an exception if the provided size is not valid (e.g. less than 1 or not a number). All containers extend FTCache_Container. The default function of a container is to store a non-persistent cache that is cleared with the instantiation of the container.
Below are explanations of the containers provided with the library.
Volatile Container
The volatile container uses a simple associative array to store the data, so it cannot be persistent. Each entry is stored in the array with the key being the cache index, and the value being the serialized object string.
CSV Container
The CSV container stores the data in a CSV text file on the disk. The first column is the cache index and the second column is the serialized object string. The default name for the file is "cache" in the current directory, and it also defaults to non-persistent. If you want to change the options for the CSV container, you need to use the second pattern for cache instantiation on the How To page, and instantiate the container seperately. The first parameter of the constructor is the size, the second is optional and is the file name, and the third is optional and is whether to clear the file on instantiation or not.