Re: Schema provider/CA lookup status
Roché Compaan <roche-kb4xc5yObU3kQYj/0HfcvhBnub05S5/[email protected]> Fri, 28 Jul 2006 09:41:05 +0200
| Newsgroups | gmane.comp.web.zope.plone.archetypes.devel |
|---|---|
| Organization | Upfront Systems |
| Message-ID | <[email protected]> |
On Fri, 2006-07-28 at 01:03 +0100, Martin Aspeli wrote: > Martin Aspeli wrote: > > > Okay, so it's calculating the hash key that makes it slow. That makes sense. > > > > I just don't quite know how we'd invalidate the cache. I suppose we > > could define some event that we'd expect people to fire when they > > changed the schema... > > I've done an implementation of that now here: > > http://dev.plone.org/collective/browser/company/trunk/content/schema.py > > see also: > > http://dev.plone.org/collective/browser/company/trunk/interfaces.py > > The DocTest on ExtensibleSchemaSupport should explain how it all works. > Basically, I took VariableSchemaSupport but simplified it a lot. You > have to fire an event to invalidate the schema and re-calculate. > > What do you think of this implementation? Something like this (at least > the VarClassGen bit and the implementation of Schema(), perhaps not the > ISchemaExtender pattern) would probably have to go into the > whitmo-schema-by-interface branch. In that case, we'd do away with the > mix-in and make this the default behaviour, of course. > > It's not terribly complex, though. In 'company', it's going to give me a > lot of power and flexibility. :) Lovely! Very nice and simple. I also like the name change from Variable to Extensible. -- Roché Compaan Upfront Systems http://www.upfrontsystems.co.za ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV