How to handle and control this behavior from Campsite is the question
as it is up to the templates developer in the first case.
I would agree with this - we dont really want to invent our own caching
system. There are tons of caching systems already built, we should use one
of them.
What is preventing us from doing that? What are the scenarios
that we need to refresh different parts of the page at different intervals
(i.e. why not just set a global timeout of 1-5 min or so)? And what about
serving code to the client so that it fetches different content instead of
doing it server side?
Andrey - you mention that "20MB" of cache is too
big. Is that number correct, because that seems like a very small number
for a cache? What does it mean to be "too big"? And is that in RAM or on
the file system?
No matter which one, it seems like a very small number for
a cache. (e.g. the Java interpreter uses more space than that in memory).
"1. APC is not enabled on shared hosting. 2. APC is unstable on Virtual
Servers which based on linux containers (like openvz/virtuozzo, lxc)."
Writing a Campsite driver for another PHP cache engine (xcache, eaccelerator
etc.) is a *1 hour* time work. Isn't any of these engines available on
shared hosting?
"Unfortunately, new introduced functionality brings new db cache issues
(unimplemented cache clear triggers) or/and new uncached queries."
Data access caching is transparent, for any new table in the db structure
you just need to inherit from DatabaseObject. There are indeed other data
structures like lists of objects that need manual refreshing on data change
but from now on Campsite is kind of in just maintenance mode, it's not worth
putting too much work in it.
Anyway, as Paul said, I don't see the point in putting our resources to
build a custom cache instead of using existing solutions.
Publications that have high traffic and need data caching should not use
crappy shared hosting. Period. As I remember CPP sites use APC data cache
and they are on shared hosting.
It looks like you're new here. If you want to get involved, click one of these buttons!