Closed (fixed)
Project:
Advanced cache
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
24 May 2007 at 18:50 UTC
Updated:
14 Jun 2007 at 19:49 UTC
node_cache.patch - Caches built nodes for authenticated users with exactly one
role.
Without having tried the module, this is something that bothers me. How come that only authenticated users with exactly one role can benefit from this patch/module? Is it simply impossible to do the caching for users with multiple roles, due to Drupal's permissions/roles/whatever design? Or is it due to the extra overhead, that you did not implement this?
Comments
Comment #1
robertdouglass commentedI'm mostly worried about either violating some access system or serving customized data to the wrong people. By all means, please apply your thinking to the problem. The solution that I have here hits the biggest percentage of a typical site's users and shows very effective performance increases. If we can find a happy algorithm (and I'm sure we can) that extends this to the other site users, I'll definitely be open to it.
Comment #2
robertdouglass commentedI came up with a new and better algorithm. I take the roles array which exclusively has numeric keys, and use it to generate a unique integer (see function advcache_array2int() in advcache.module). This is then used in building the key so that nodes get cached based on the combination of roles a user has. This now applies to anonymous users as well, so anonymous nodes get cached, too. In short, a copy of a built node gets built for every combination of roles.
This approach is assuming that people who are interested in this patch are willing to have large physical databases and/or spend money on physical memory (in the case of using this in conjunction with memcache).
Current code is in HEAD... will role a new release after some other updates.
Comment #3
wim leersGreat! Thanks :)
Comment #4
(not verified) commented