The concept is
not by me, I was looking for a cache class for using in the drake
cms.
At first I found
PHP hypercacher , later I found also a
component from an other CMS with the same concept.
I
do a lot of copy and paste from this source into the index.php
(drake cms) and copy some php file from the component into the
directory of drake and add a table to the db.
I do the
coding (hardcoding) with a "hot needle" ignoring all
the darke devolopers guidelines, I only want to see the result
and how fast it could be. The cached page will be shown without
any drake core and db query.

I don't know if you like this concept, here is a short
summary
at top of the index.php
I load a
class php for reading the cache config file and also some needed
function.
then the source looks if the cache is
enabled and some rules are okay then we look for a cached file in
the cache dir. if found we send it to the browser and exit the
index.php without executing the drake core.
if not
found then the drake core is executed.
at the end of
index.php there is also some code which generate a cache file and
update a table in the db.
In the drake core I
made some needed modification that it will work like on my
site.
1. on the first opening of a drake site we must
set a cookie for the user language (func CMSUser), because the
language is part of cached filename.
2. for the login
into the frontpage (mod_login) we also need a cookie (func
initlogin) so we could disable the hole caching. also if we
logout we must remove the cookie.
3. in pagenav.php
the link for << Start should be the same like for the first
page.
Start :
option=content&task=view&id=1&Itemid=10
First Page (1) :
option=content&task=view&id=1&Itemid=10&page=1&am
p;total_items=6
both links show the same content but for the caching the
have different urls and so we generate two cache files.
4. in drake.php (function GetComponentParams) your build a new
url if there is no Itemid.
You put the Itemid at the second
position. It would be better if you can put it at the end before
the seo. Because in the cache config I can set a disallow filter
like this
"option=content&task=section\noption=content&task=
category"
so I can disable the whole tree.
From the
Mainmenu
News >> Drake CMS News
(option=content&task=category&id=7&Itemid=10)
we
select a content and then in the pathway we have a link for
Drake CMS News (option=content&task=category&id=7)
after clicking on this link we get a new one like
(option=content&Itemid=10&task=category&id=7)
We have two different links for the same this is not
good.