symfony-cmf/BlockBundle — pull request #67 by rmsint (2013-05-30 22:55:11+00:00)
Title: [PoC] Cache - remember BlockContext for Varnish, Ssi and Js

When using Varnish, Ssi or Js cache the settings passed here are lost:

```
{{ sonata_block_render({
'name': 'rssBlock'
},{
'maxItems': 2
}) }}
```

This is an attempt to fix this by caching the BlockContext using another cache, fe. apc.

Taking Js as example, an url is generated and added to some javascript. This javascript is injected in the page. When the page is loaded, the javascript calls the url to retrieve the block content. By adding a unique key for the BlockContext to the url it is possible to reconstruct the BlockContext as it was called from the template.

The following config is then needed to get it working:

```
#app/config/config.yml
sonata_cache:
caches:
apc:
token: 12345
prefix: cmf_sandbox_

cmf_block:
context_cache: sonata.cache.apc
```

Is this a direction to go?