> > First of all, the routing mechanism -and please correct me if I'm
> > wrong- is not correctly working with view caching. I make heavy use of
> > routes in the shake of user friendlyness and search engine
> > optimization, so the 'controller/view/parameter' paradigm doesn't fit
> > my URIs in most cases, and the cache mechanism works incorrecly under
> > this circumstance:
> >
> > Views with $_POST data were actually being cached, which included
> > sometimes failed user logins being cached and thus passwords stored in
> > the static generated view.
>
> Do you mean <cake:nocache> is not working for login forms?

No. A cached view should be deleted anytime an INSERT, UPDATE or DELETE
operation is done by it's related model (this behaviour is also
detailed in CakePHP's online manual). This is checked by the private
method _clearCache() in /cake/libs/model/model_php4.php. But this
method spects the URI to be in a '/controller/view/parameter/' format
-or at least that's what I think.

When a routes are used, the URI format can be different, and in this
case the _clearCache() method is not able to find the cached filename
and delete it. So the cached view is never deleted. I've made the
little workaround (patch) I wrote in the previous post, which is
working for me.

> > Also, views weren't deleted after an INSERT,
> > UPDATE, or DELETE operations, because they tried to delete a cache file
> > stored under the 'controller_view_parameter.php' format, which is not
> > always true when routing is used.
>
> I guess this is a bug deserves a ticket in the Trac - if possible
> provide a patch to fix the problem.

I think that too :-) But maybe someone here is having the same problem
and can give some feedback, or maybe a CakePHP guru can give here some
hints before opening a ticket.

> > in subdirectories ordered by their first character. Something like
> > /views/a/, /views/b/, and so on.
>
> Yes what you have heard is true and what you are proposing is somewhat
> similar to what SMARTY does but with SMARTY it replicates the real
> application directory structure.

Great! If that's true and there is a perfomance involvement, maybe I'll
contribute a patch. Seems to be easy to implement, but -again- I'd like
some feedback because I'm not completely sure this will be accepted.

> > Anyway, and in spite of this little issues, the view cache has
> > *dramatically* reduced my server's load and the number of queries per
> > hour.
>
> If you could share some benchmarks it would be very much appreciated.

I'm afraid this is going to be impossible, because my server
environment is not the best to make a benchmark (I have many other
services and sites on the same machine which I cannot stop). However, I
will try to get some conclusions about the cache, if finally I
implement the proposed directory structure, and I'll share it here if I
find something intersting.

Regards,

> Cheers
> Tarique
>
> --
> =============================================================
> PHP for E-Biz: http://sanisoft.com
> Cheesecake-Photoblog: http://cheesecake-photoblog.org
> =============================================================


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
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