A
A
AdNahim2016-03-17 16:08:56
MODX
AdNahim, 2016-03-17 16:08:56

How to control the display of the site from the cache when the database server crashes?

Noticed an interesting feature.
For a couple of weeks, copywriters and editors have been hard at work stuffing content onto the site.
There was no desire to display an unfinished site, since there are flaws in the layout and structure, so the status of the site was set to "no" .
However, it happened that the database server went down. And all our "creation" (obviously ignoring the "site status" ) was safely displayed from the cache :)
How is it more competent to hang up some kind of "stub" in case of such troubles?
Thanks to.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DarkMatter, 2016-03-17
@darkmatter

If the database connection variable is true - everything is fine, if false - return from the cache.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question