Search
 
SCRIPT & CODE EXAMPLE
 

HTML

cache control html

<meta http-equiv="Cache-control" content="public">
Comment

Using Cache Tags

use SymfonyContractsCacheItemInterface;
use SymfonyContractsCacheTagAwareCacheInterface;

class SomeClass
{
    private $myCachePool;

    // using autowiring to inject the cache pool
    public function __construct(TagAwareCacheInterface $myCachePool)
    {
        $this->myCachePool = $myCachePool;
    }

    public function someMethod()
    {
        $value0 = $this->myCachePool->get('item_0', function (ItemInterface $item) {
            $item->tag(['foo', 'bar']);

            return 'debug';
        });

        $value1 = $this->myCachePool->get('item_1', function (ItemInterface $item) {
            $item->tag('foo');

            return 'debug';
        });

        // Remove all cache keys tagged with "bar"
        $this->myCachePool->invalidateTags(['bar']);
    }
}
Comment

PREVIOUS NEXT
Code Example
Html :: content editable 
Html :: embed recaptcha in html 
Html :: html clear input after submit 
Html :: html signature 
Html :: bootstrap news template 
Html :: embed html 
Html :: contact form html code 
Html :: onsubmit in html 
Html :: how to put image in navbar 
Html :: how to display google map in html 
Html :: definition list in html 
Html :: style tag html 
Html :: cool css buton 
Html :: how to change text color using only html 
Html :: embedded youtube 
Html :: html redirect after alert 
Html :: change font size of h1 in html 
Html :: registration form template bootstrap 
Html :: dropdown calendar html 
Html :: collapse bootstrap 4 
Html :: bootstrap hide row 
Html :: bootsrap main section fill all height with navbar 
Html :: edit button html 
Html :: angular bottom sticky footer 
Html :: css image slideshow 
Html :: licença anydesk gratis 
Html :: twig array keys and values 
Html :: title tag in html 
Html :: del html 
Html :: html how to start a page 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =