CI_Cache::decrement()

decrement($id[, $offset = 1]) Parameters: $id (string) – Cache ID $offset (int) – Step/value to reduce by Returns: New value on success, FALSE on failure Return type: mixed Performs atomic decrementation of a raw stored value. // 'iterator' has a value of 6 $this->cache->decrement('iterator'); // 'iterator' is now 5 $this->cache->decrement('iterator', 2); // 'iterator' is now 3

CI_Cache::clean()

clean() Returns: TRUE on success, FALSE on failure Return type: bool This method will ‘clean’ the entire cache. If the deletion of the cache files fails, the method will return FALSE. $this->cache->clean();

CI_Cache::cache_info()

cache_info() Returns: Information on the entire cache database Return type: mixed This method will return information on the entire cache. var_dump($this->cache->cache_info()); Note The information returned and the structure of the data is dependent on which adapter is being used.

CI_Cache

class CI_Cache is_supported($driver) Parameters: $driver (string) – the name of the caching driver Returns: TRUE if supported, FALSE if not Return type: bool This method is automatically called when accessing drivers via $this->cache->get(). However, if the individual drivers are used, make sure to call this method to ensure the driver is supported in the hosting environment. if ($this->cache->apc->is_supported()) { if ($data = $this->cache->apc->get

CI_Benchmark::memory_usage()

memory_usage() Returns: Memory usage info Return type: string Simply returns the {memory_usage} marker. This permits it to be put it anywhere in a template without the memory being calculated until the end. The Output Class will swap the real value for this variable.

CI_Benchmark::mark()

mark($name) Parameters: $name (string) – the name you wish to assign to your marker Return type: void Sets a benchmark marker.

CI_Benchmark::elapsed_time()

elapsed_time([$point1 = ''[, $point2 = ''[, $decimals = 4]]]) Parameters: $point1 (string) – a particular marked point $point2 (string) – a particular marked point $decimals (int) – number of decimal places for precision Returns: Elapsed time Return type: string Calculates and returns the time difference between two marked points. If the first parameter is empty this function instead returns the {elapsed_time} pseudo-variable. This permits the full system execution time to be show

CI_Benchmark

class CI_Benchmark mark($name) Parameters: $name (string) – the name you wish to assign to your marker Return type: void Sets a benchmark marker. elapsed_time([$point1 = ''[, $point2 = ''[, $decimals = 4]]]) Parameters: $point1 (string) – a particular marked point $point2 (string) – a particular marked point $decimals (int) – number of decimal places for precision Returns: Elapsed time Return type: string Calculates and returns the time difference between two marked po

character_limiter()

character_limiter($str[, $n = 500[, $end_char = '…']]) Parameters: $str (string) – Input string $n (int) – Number of characters $end_char (string) – End character (usually an ellipsis) Returns: Character-limited string Return type: string Truncates a string to the number of characters specified. It maintains the integrity of words so the character count may be slightly more or less than what you specify. Example: $string = "Here is a nice text string consisting of eleven words.";

camelize()

camelize($str) Parameters: $str (string) – Input string Returns: Camelized string Return type: string Changes a string of words separated by spaces or underscores to camel case. Example: echo camelize('my_dog_spot'); // Prints 'myDogSpot'