You can check with ConnectionManager if database is connected (in
app_controller __construct() )
if not connected use clearCache() to clear your views cache.


On Aug 23, 10:12 am, aranworld <[EMAIL PROTECTED]> wrote:
> This is what is currently happening to a site I have:
>
> 1) person visits site's home page, which contains an element which
> displays the top news stories from the database
> 2) since the element is set to be cached, a cached view file is set
> with an expiration of 3 hours
> ... 2 hours later ...
> 3) the webhost's database server crashes
> ... 3 hours later (database still crashed) ...
> 4) a new users visits the site prompting the element to build another
> view cache.
> 5) however, since the database is crashed, the element doesn't list
> any items, so the new view that is written tot he cache is blank
> 6) for the next 3 hours the news update box is blank
>
> Is there a way to get Cake to not overwrite an old cached view, if it
> can detect that there was a database connectivity problem?
--~--~---------~--~----~------------~-------~--~----~
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