[Product-Developers] [Plone 4] Caching actions of portal_tabs

Gilles Lenfant gilles.lenfant at alterway.fr
Fri Jan 27 15:09:22 UTC 2012


Le 27 janvier 2012 12:33, Andreas Jung <lists at zopyx.com> a écrit :

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi there,
>
> I have a custom action inside the portal_tabs action category
> with a condition:
>
> python: portal.restrictedTraverse('isAllowed')()
>
> isAllowed() returns True/False for anonymous/non-anoymous users
>
> There seems to be some caching of the portal_tabs actions since
> the code of isAllowed is called across requests only *once*
> and not every time...this caching appears stupid (and dangerous) - why
> does it happen?
>

Hi Andreas,

This is strange because the only caching I can see for  is the "in request"
caching in the plone_context_state. I made a portal_tab action in a vanilla
Plone 4.1 with this condition (and no permission) :

python:portal.plone_log('evaluating', 'a portal tab') or True

A new line appears in the log for each user request, no more, no less.
Perhaps are you using a 3rd party component that makes a more aggressive
cache on portal_tabs.


>
> - -aj
>
> - --
> ZOPYX Limited           | zopyx group
> Charlottenstr. 37/1     | The full-service network for Zope & Plone
> D-72070 Tübingen        | Produce & Publish
> www.zopyx.com           | www.produce-and-publish.com
> - ------------------------------------------------------------------------
> E-Publishing, Python, Zope & Plone development, Consulting
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQGUBAEBAgAGBQJPIouiAAoJEADcfz7u4AZjzeALvi4I8RTjeeI2BDNBDfmDY5gg
> j6K73XcaM7++bTlnqfMyjCuX5llMoi0j1yx096gKxQBStJg68iH8VVbHWQS4IVOK
> lib6CBTRdafnw4ghOJRaRkuPDH9sDaKoa/gTRO6uKuAATqsmPEi/RwnhrDgIXKTo
> Jgw+6hPw8Yt9y/Fig3MxzzlkRlwBAFdVuqZuZK9S/BYlNoscbjdAgj16FiZxMGAy
> JgV2rlr+BRG3f7KZFIUUKMDKEBCTWQ0n7h5EPNgHvJrjqkE6JCCbINh4aoJlKA5W
> ZVNo8Ojya1URL/b4TGBK0FjTPswuDghF07Tlid4izZCBixKaXQZQmqixbkiE9E/H
> D3SbJEca0HYj7YgMFh8NNCjDRcxas2UYP1nS7Tx5cgieDKseiTHEj+qvdURovu90
> kjuWqcnQhJvzevM5bWjLo+9GO/rSHTja/nYCxNLxlfNK+z8sBHfQxoNp5JcDr9ec
> T8q5uvKCtPM39ew0VsEE9vNWFcL7N8c=
> =xDSo
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Product-Developers mailing list
> Product-Developers at lists.plone.org
> https://lists.plone.org/mailman/listinfo/plone-product-developers
>
>


-- 
-- 
Gilles LENFANT
Ingénieur avant-vente - Architecte senior
ALTER WAY SOLUTIONS
T : 01 78 15 24 00
F : 01 46 02 44 04

Téléchargez notre nouveau livre blanc "Python, le développement autrement"
http://www.alterway.fr/publications/python-le-developpement-autrement

1 rue Royal, Bat. D
227, les Bureaux de la Colinne
92210 Saint Cloud
http://www.alterway.fr/solutions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20120127/36a34f68/attachment.html>


More information about the Product-Developers mailing list