[Twisted-web] Fix for an issue 92 (windows binary distribution
made with distutils doesn't install data files into
package directories)
Valentino Volonghi aka Dialtone
dialtone at divmod.com
Thu Mar 3 15:51:25 MST 2005
Andrea Arcangeli wrote:
>On Wed, Mar 02, 2005 at 10:48:03PM +0000, Matt Goodall wrote:
>
>
>>Yes, someone will.
>>
>>
>
>btw, I would also like to send a reminder about getting the caching
>stuff into the trunk ;). I proved that the hard approach in rend.Page is
>significantly more performant than the tags.cached pure approach (even
>the hard approach is less clean).
>
>This is what I carry in my own Nevow branch (most of it is dialtone's
>Nevow-caching branch):
>
>
The patch has been applied (with some improvements) in the caching branch.
I'm on your side here and I would like to make a decision on this feature.
We have 2 implementations:
foom's:
The cache is keyed with the interfaces' values that the cached tag uses
internally and a new context, that only remembers those selected
interfaces, is created and passed through the cached tag to render its
content.
+ very secure
- hard to understand why you should always key with at least
IRendererFactory
mine:
The cache can be keyed with any object, if you pass a sequence the
cached tag will be registered for each item in the sequence and the
sequence itself. An optional scope argument can be used to tell where
the cached content should be stored (anything that implements ICache can
act as a CacheStore), by default there are 2 scopes: sitewide (without
any extra argument passed to t.cached tag) and ISession (which stores a
cached item per user).
+ easier to understand for a beginner
- less secure and harder to use, since you have to manually provide a
unique key, when there are many many many cached items.
Now, I must say that I like foom's idea but it need a bit of tweaking
IMHO to allow easier use for beginners.
--
Valentino Volonghi aka Dialtone
Now Running MacOSX 10.3.8
Blog: http://vvolonghi.blogspot.com
http://weever.berlios.de
More information about the Twisted-web
mailing list