Cachearium\Backend\CacheRAM::limitRAM PHP Method

limitRAM() public method

Clears cache if PHP memory usage is above a chosen limit This checks the ENTIRE PHP memory usage, which may be a lot more than what is used by this backend.
public limitRAM ( ) : boolean
return boolean
    public function limitRAM()
    {
        if (memory_get_usage() > $this->memoryLimit) {
            $this->clear();
        }
        return true;
    }