eZ Community » Forums » Setup & design » Pre-generate cache for back-office
expandshrink

Pre-generate cache for back-office

Pre-generate cache for back-office

Tuesday 27 December 2011 5:53:04 pm - 6 replies

Hi,

Is there a script or a way to force cache pregeneration before event login into the back-office administration?

Thanks,

Tuesday 27 December 2011 6:45:26 pm

Not sure tu understand your question

You mean, the template cache ? after an all cache purge ?

Tuesday 27 December 2011 7:29:46 pm

Hello Jean-Luc,

 

I'm not certain I understand your question 100% clearly. You may wish to update your question and add additional details better describing your use case requirements.

 

Offhand I would suggest the updatecache extension, which was recently updated for 4.6 compatability.

With this extension you can generate (anonymous user) cache from the admin.

https://github.com/brookinsconsulting/bcupdatecache

 

I hope this helps ...

 

Cheers,

Heath

Wednesday 28 December 2011 9:38:53 am

Hi,

Sorry for the missing details. Yes, I was talking about backoffice template cache, after an all purge.

Thanks,

Wednesday 28 December 2011 10:36:29 am

Hello Jean-Luc,

 

Thank you for the additional tidbits of detail. But you leave us wondering ...

Does my suggestion to try using updatecache extension work for your needs?

 

If not, can you please explain your needs in greater detail using more than just a few brief keywords. I strongly recommend using full and complete English sentences. I suggest using more than two sentences but personally prefer posts with at least four (not many meet this standard though ...)

 

I guess I've never heard of someone with a need to generate cache for an admin siteaccess before, user siteaccesses sure but not admin siteaccesses ... 

Also because cache is often content specific (to say the least here), I do not think that you could -really- generate -all- the caches within the context of a login request (at all, I would not even try ...).

 

I would re-evaluate your requirements to focus on needs more than ideas for desired implementations. I would not try to generate all caches on the fly within the context of another request, perhaps independently or for limited amounts of cache, but not all caches.

 

I hope this helps ...

 

Cheers,

Heath

Wednesday 28 December 2011 11:47:06 am

Ok, if you need to re-generate the "template" cache, you have to consider differents points :

  • This whole cache generation could take 30s / 1 minute (depending of the hosting). Try a "php bin/php/eztc.php -s site_admin" to evaluate. So you understand that's not a good idea to execute this task on the user login
  • You should never purge the admin template cache. eZ Publish propose a lot of command lines to clear / purge a specific cache, by siteaccess or by a set of template files. I am writing a tutoriel about the all cache system (and also the template cache system), and you'll find your way to never need to expire the all template cache or view cache happy.gif Emoticon

Tuto release date : in french : january, in english : february

Wednesday 28 December 2011 12:25:16 pm

Hi Heath, Gilles,

Thanks for your answers. To answer to Gilles, indeed, executing eztc.php takes more time than directly accessing the backoffice user/login page. I know we should not purge the admin cache, but our problem is on a deployment task, which is done regularly in a test environment.

Thanks for your help anyway.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from