Problem creating custom AMP plugin

Hi there,

I’m trying to create my own amp plugin. Right now I’m just replacing with in the AMP version of a page. It’s working, but problem is that it seems that grav is using the same cache versión for both pages. So if I clear cache and try to load my amp version:
all are replaced with
But if I try to load the normal html version
images are still replaced with

If I clear the cache and load first the normal html version
are not replaced, but when I try to load the amp version
no are replaced with

Of course, I don’t want to disable cache for this pages since they need to be fast.
Any thoughs?

Thank u

How did you setup your AMP implementation? I added a default.amp.twig to my theme and tried visualizing my page with .amp extension, all fine. Is that a modular page? Things might change in that case.

Hello flaviocopes,

Its a blog page (item.amp.twig), and it’s working fine, but only if I use cache_enable: false
if I left the cache enabled the behaviour is the one I have described on the first post

I tested that too. Do you have additional caching plugins installed?