generateCacheKeyForShop example


    public function doLock(Shop $shop$lifeTime = 3600)
    {
        if ($this->isLocked($shop)) {
            return false;
        }

        $data = sprintf('Locked: %s', (new DateTime('NOW', new DateTimeZone('UTC')))->format(DateTime::ATOM));

        $this->cache->save($this->generateCacheKeyForShop($shop)$data$lifeTime);

        return true;
    }

    /** * @return bool */
    public function unLock(Shop $shop)
    {
        $this->cache->save($this->generateCacheKeyForShop($shop), null, -1);

        
Home | Imprint | This part of the site doesn't use cookies.