Ok,
now I figured out how to make the dynamic cache work, but I have another problem now: I'm using the output buffer but it's working only with Google Chrome, as the string replacement is not being performed with IE, nor Firefox. Unfortunately, I can't spot any error and the cache logs the same lines after a page request made by Chrome and a page request made by Firefox or IE.
Any idea about this?