News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

ServerGrove Blog:
How to Create a Cache Warmer in Symfony2
April 19, 2012 @ 09:09:56

In this new post from the ServerGrove blog Ismael Ambrosi shows how to create a "cache warmer" for a Symfony2 application - a handy tool that can pre-populate your applications cache with data you specify before it's needed by the app.

The cache is a very important part of your Symfony application as it helps your web server to perform better by not executing unnecessary code on every request, this is especially true if your server is running with limited resources. Cache warming allows you to cache specific data in your application through the use of a CacheWarmer. Symfony 2 includes a cache warmer that helps you to store parts of your application in cache, before the application becomes available to the user.

He shows how to create the "warmup" in an object extending the CacheWarmer to pull in content (in his case, just a text string) and write it out to a cache file automatically. Also included is the config updates you'll need to make to tell the Service Container about the Warmer.

0 comments voice your opinion now!
symfony2 framework cache warmer tutorial


blog comments powered by Disqus

Similar Posts

PHPEveryhwere: ADOdb Implementation of Active Record - cloning Zend_Db_DataObject

International PHP Magzine: Poll Question: Do you believe the following about PHP?

Dave Marshall's Blog: Zend Framework and the Twitter API

Giorgio Sironi's Blog: Never write the same code twice: Dependency Injection

Cake Baker's Blog: First (?) german CakePHP blog started


Community Events





Don't see your event here?
Let us know!


artisanfiles version laravel interview tool symfony framework opinion release composer conference language podcast list security series community voicesoftheelephpant library introduction

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework