Contao\Cache::getInstance PHP Method

getInstance() public static method

Instantiate the cache object (Factory)
Deprecation: Deprecated since Contao 4.0, to be removed in Contao 5.0. The Cache class is now static.
public static getInstance ( ) : Cache
return Cache The object instance
    public static function getInstance()
    {
        @trigger_error('Using Cache::getInstance() has been deprecated and will no longer work in Contao 5.0. The Cache class is now static.', E_USER_DEPRECATED);
        if (static::$objInstance === null) {
            static::$objInstance = new static();
        }
        return static::$objInstance;
    }