php - Symfony check if catching is working -


ok have developed simple api using symfony learn framework, api complete , works add caching in enhance performance , learn how done in symfony framework environment.

i found this: cache symfony

so have added cache annotation on top of indexcontroller so:

/**  * @cache(expires="+5 minutes", public=true)  */ class indexcontroller {     /**      * @var createbookfactory      */     public $create;      /**      * @param createbookfactory $createbookfactory      */     public function __construct(         createbookfactory $createbookfactory,     ){         $this->create = $createbookfactory;     }      /**      * @param request $request      * @return jsonresponse      */     public function createaction(request $request)     {         return new jsonresponse($this->create->build($request));     } } 

what dont understand how can check if worked looked cache folder has dev subfolder there nothing raleted indexcontroller. maybe there way check through profiler or maybe better use different caching tool symfony.

ok understand annotation cache used front end catching:

cache-control:public connection:close content-type:application/json date:wed, 27 jan 2016 15:20:04 gmt expires:wed, 27 jan 2016 15:25:04 gmt 

the symfony cache , app cache not same. it's more headers browser. if want test check headers send browser. looking @ annotation send header expires

you need understand difference between front , backend caching.

frontend cache request there more advanced cache technique based on esi varnish can speed site.

you asked tool. i'd recommend friends of symfony cache bundle

for backend cache recommend memcache(very easy cache) basic cache , redis more advanced caching.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -