Cachearium\Backend\CacheRAM::singleton PHP Method

singleton() public static method

Cache constructor (this is a singleton).
public static singleton ( ) : CacheRAM
return CacheRAM The cache singleton.
    public static function singleton()
    {
        static $instances;
        if (!isset($instances)) {
            $instances = new CacheRAM();
        }
        return $instances;
    }

Usage Example

 public function teststartCallbackRAM()
 {
     $cache = CacheRAM::singleton();
     if ($cache->isEnabled()) {
         $this->_startcallback($cache);
     }
 }
All Usage Examples Of Cachearium\Backend\CacheRAM::singleton