The implementation of such a filter is quite simple. In fact, a similar solution exists in symfony.
Look at the default caching filter (sfCacheFilter class). He does something similar to what you are looking for.
Alternative way
memcache, memcache.
(apps/yourapp/config/factoryories.yml config/factories.yml):
all:
view_cache:
class: sfMemcacheCache
memcached, symfony sfMemcachedCache, .
cache.yml.