CI_Cache::is_supported()

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('my_cache'))
        {
                // do things.
        }
}
doc_CodeIgniter
2016-10-15 16:30:56
Comments
Leave a Comment

Please login to continue.