Just a a couple cache questions -- I have read all I can find about
caching here and oin the bakery and now in the code. I am running the
alpha 1.2 code (I'll update to the pre beta this week). Hopefully
these questions are up to par.

1) I have been interested in the coarse granularity view caching and
to that end was mystified that I couldn't get anything but pages/
actions named "index" to cache. After reading the code I found that
specifying:

var $cacheAction = array('myaction' => 86400) or var $cacheAction =
array('myaction/' => 86400);

will not work - you MUST specify the controller name as well -- this
only works for "index".

var $cacheAction = array('mycontroller/myaction' => 86400) WORKS FINE

Perhaps this has something to do with routes? I have not defined
anything in config/routes other than a single route to connect users
up to my landing page when they specify my cake app without a specific
controller/action. I traced the code in helper/cache.php to determine
the right syntax.

2) I also have a question about the MODELS subdir in tmp/cache. It
seems to me the names of the files are driven my controller file names
not model names -- can someone confirm this? And how often are these
updated? In my app it appears the timestamps of these files is touched
every request although the contents is not changed. Perhaps this is
because of something I have done? How can I track the access to these
files and determine why they are constantly being updated every
request?

3) I read in the manual that "First, you should be aware that Cake
will automatically clear the cache if a database change has been made.
For example, if one of your views uses information from your Post
model, and there has been an INSERT, UPDATE, or DELETE made to a Post,
Cake will clear the cache for that view." When I tested this and
essentially had cake cache a simple "index" view of some simple
records, even after I added a new record when I went back to the index
view I kept getting the cached view -- it never invalidated the cached
view when the add operation occured. I understand how to do this
myself in afterSave but I thought cake did this "automatically"? What
am I missing here?

4) Finally after my reading here and in the bakery since my app shows
different data in a single view, and sometimes different views
altogether based on the level of user authentication (guests, reg
users, admins) that I will have to implement some finer control of
what gets cached -- otherwise folks with lower privilege may get
served up a cached view with data they are not supposed to see. Will I
also have to manage the invalidation of cached items when exercising
that finer control? I'm just not clear on when/how cake goes and
invalidates contents of the cache based on a DB update.

Thanks in advance and CAKE ON!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to