The following component (+example controller using it) might help...
I use it a lot.
===
http://bakery.cakephp.org/articles/view/ecache-easy-per-user-or-per-anything-cache-of-html-or-arrays
Caching is basically required for any data-heavy or interaction-heavy
site... but you need to
Ketan Patel,
I am attempting to do the exact same thing and am running into
trouble. How exactly are you setting the $userid variable? What I have
done is in my view, set it up like this, $session-read('User.id), so
the user id is set there, and then something like $this-
element('tagCloud',
Well, technically when you cache something, you are creating a cache
file which is a static html file. So if you have 1,000 users then it
would create 1,000 separate cache files. This would not slow down if
you have enough space on machine, as you would read in one file only
per user. It is
Awesome. I was looking for a way to do that. Thanks for the input.
On 7/5/07, Ketan Patel [EMAIL PROTECTED] wrote:
Found a way to do it using cake without modifying the core libs. This
is a workaround, but does the job.
$this-element('tagCloud', array('cache'='+1 day', 'plugin'=
$userId));
On 7/5/07, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
Is there any scope in an enhancement to the Cake cache, that allowed
you to bind certain session variables into the cache hash. Eg. you
could setup the cache for certain views to be cached with an md5 of
specified session variables.
I
Thought it could do with some discussion before going onto trac, so we
could clean up any debate over it, but yeah, will get round to that
soon.
simon
On Jul 5, 2:15 pm, Chris Hartjes [EMAIL PROTECTED] wrote:
On 7/5/07, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
Is there any scope in an
On 7/5/07, Ketan Patel [EMAIL PROTECTED] wrote:
Can some one pls shed some light here.
I don't think Cake can help you out there. What you might have to do
is code your element in such a way that it does the caching itself
based on a unique ID. You might consider a small file-based caching
Currently I do
?php echo $this-element('tagCloud', array('cache'='+1 day')); ?
Element 'tagCloud' :
?php $this-requestAction('controller'='tag',
'action'='generateTagCloud'); ?
What I would want to do is to have a cached element individual to each
user? So it could be like 'tagCloud_user1',
Is there any scope in an enhancement to the Cake cache, that allowed
you to bind certain session variables into the cache hash. Eg. you
could setup the cache for certain views to be cached with an md5 of
specified session variables.
It would solve this problem, and probably make quite a nice
On Jul 5, 6:03 pm, Ketan Patel [EMAIL PROTECTED] wrote:
Currently I do
?php echo $this-element('tagCloud', array('cache'='+1 day')); ?
Element 'tagCloud' :
?php $this-requestAction('controller'='tag',
'action'='generateTagCloud'); ?
What I would want to do is to have a cached element
Found a way to do it using cake without modifying the core libs. This
is a workaround, but does the job.
$this-element('tagCloud', array('cache'='+1 day', 'plugin'=
$userId));
so this would create the file 'element_$userId_tagCloud' in the cache
folder for views.
Now to delete it,
Thanks Rajesh, to get me going in right direction.
Ketan
R. Rajesh Jeba Anbiah wrote:
On Jul 5, 6:03 pm, Ketan Patel [EMAIL PROTECTED] wrote:
Currently I do
?php echo $this-element('tagCloud', array('cache'='+1 day')); ?
Element 'tagCloud' :
?php
Is there a way to cache elements separately for each user? Currently,
since the element name is same, the cache is basically overwritten, I
would prefer to cache the element individually. So that later on, I
can delete the cache when an update is performed for that user,
otherwise it is uses the
13 matches
Mail list logo