Move all python code out of plone:static dir. Mixing python code with plone:static has strange effects when it comes to caching.