You can use some of the model hooks (like after save) to clear the
cache, then call a method that rebuilds it, or the appropriate parts.
You might also consider storing separate caches for each component/
model whenever it's updated.

With the home page idea, you can create a controller with no model
behind it, and update your routes for '/' to point to that controller.
It's not unlike the pages controller (notice no model).

~Cameron

On Aug 7, 11:01 am, andy <[email protected]> wrote:
> Hi all,
>
> Has anyone made a CakePHP project where you have a homepage that pulls
> information from various models (ex: calendar events, news articles,
> etc.) and displays it on said homepage?
>
> In Rails I did something like that in the past... and I was able to
> clear the cache for the homepage whenever I made an update to any of
> the (calendar events, news articles, etc.) models.
>
> I've been reading through the CakePHP Book docs and searching this
> group but I haven't been able to find a way to clear my Homepage cache
> whenever I make a change to those "included" models.
>
> Any idea how I could do this?  If all else fails... I may just have to
> put in some code to delete the main Homepage cache file manually after
> a model is saved or deleted.  But I still hope there is a cleaner
> way...
>
> Andy

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" 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