You know.. I was never had a chance to speed up symfony project performance. I always knew there are a bunch of cache plugins but also always performance was enough good even without any type of caching.
And now I had a chance to investigate this question. I googled for “sfSuperCache” and found some performance measurements which says that it’s faster than sfMemcached, not sure if that’s true but I liked the logic of how supercache plugin would work. So I went and installed this plugin..
But then story is not ending 🙂
I added super cache filter to filters.yml, I modified .htaccess like instructions says. I launched my app and.. nothing.. (it’s time to say it has to store static html files in web/cache folder). I googled again and found a thread in symfony’s forum where guy is asking actually the same – “I installed the plugin and is it working?” – no man, it does not work. I started to debug plugin and figured out not obviously things which are though pretty obvious (which proves that this plugin only for real Gurus 😉 )
So take your pen and write following me (of course these things should be done after you did the changes to filters.yml and .htaccess like written in plugin instruction):
1. Go to your apps/frontend/settings.yml and uncomment if you did not yet:
.settings:
cache: on # Enable the template cache
2. Go to your apps/frontend/cache.yml and write if you did not yet:
default:
enabled: on
with_layout: true
lifetime: 86400
Here key phrase is with_layout: true
And only now you can go and drink some beer: you did it man, huzza!
2 replies on “Symfony’s super puper cache plugin”
of course it’s quicker than memcached. Memcached helps accessing the server data faster. sfSuperCachething directly stores the output into a file, so the framework doesn’t even have to access any server-side data. In the case where none of your data rely on the user session or stuff like that, you should always do a global file cache
cedric
Symfony’s super puper cache plugin…
You know.. I was never had a chance to speed up symfony project performance. I always knew there are a bunch of cache plugins but also always performance was enough good even without any type of caching….