[development] CCK per field CRUD settings, caching complexity

Bèr Kessels ber at webschuur.com
Sat May 27 11:02:12 UTC 2006


Hello list,

I am developing some per-field CCK permissions: CRUD settings for every chunk 
of data.

But I am still rather concerned about caching. Let us assume two roles, and 
three field types:
 Role1: child
 Role2: easter bunnies

 Field1: description, viewable by boh roles
 Field2: Egg color: only viewable by children
 Field3  Egg Location: only viewable by easter bunnies

IF we add an Egg Node, we will have three virtual nodes:
in DB, viewed by admins etc:
  descr: This Grand Foo Egg is very nice, it tastes like beer, but is made 
from specially, handselected Foo. 
  color: Yellow and white.
  location: Bar.

child looking at node:
  descr: This Grand Foo Egg is very nice, it tastes like beer, but is made 
from specially, handselected Foo. 
  color: Yellow and white.

bunny looking at node:
  descr: This Grand Foo Egg is very nice, it tastes like beer, but is made 
from specially, handselected Foo. 
   location: Bar.

So back to caching: Should we cache them as three separate nodes? This means 
that any combination of fields and roles will get a cache entry. with five 
roles and 3 fields this becomes (I forgot the math, was it 5! or 5^5 ?) a 
lot!

The other option is to cache per role: the obvious problem occurring here is 
what to do with users that have more then one role. In the first example each 
combination of roles has an own entry. But here we would have less cahce, but 
more complex code to merge the various cache results, which is additional 
overhead, and kindof defeats the purpose of cache.

So: Are there other ideas? Modules I should look at? Or do you think I am 
going down the wrong road? 
Bèr

-- 
 PGP ber at webschuur.com
  http://www.webschuur.com/sites/webschuur.com/files/ber_webschuur.asc
 PGP berkessels at gmx.net
  http://www.webschuur.com/sites/webschuur.com/files/ber_gmx.asc


Drupal upgrade repareert kritiek beveiligingslek:
 http://help.sympal.nl/drupal_upgrade_repareert_kritiek_beveiligingslek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.drupal.org/pipermail/development/attachments/20060527/e5ad6ea3/attachment.pgp


More information about the development mailing list