[TYPO3] Precaching question

Bernhard Kraft kraftb at kraftb.at
Fri Jan 18 21:44:31 CET 2008


Vahan Amirbekyan wrote:
> I cannot agree and let me explain.
> the site is a community site. it allows keep-me-logged feature. So most
> users ( 40,000 at the moment ) are constantly logged on users.
> now...
> the only personalization on most pages is the user's name, the rest of
> page content is the same.
> all pages are comprised of plugins that are cache-enabled. The plugin
> that renders current user name is not cache-enabled.
> So pre-caching should cache all plugins for all users, it is the
> username plugin only which will be not-cached.

Hi Vahan !

Well ... first I hope that the plugin which generates the username is of
type "USER_INT" or "COA_INT" ... else it wont make much sense. If you call
"$TSFE->set_no_cache()" or set "$TSFE->no_cache=1" in your plugin the
complete page wont be cached ...

but if you use a USER_INT or COA_INT object the complete page gets cached.
and instead of the USER_INT/COA_INT object a marker like:
<!--###COA_INT_sdfsdjlkfjds###--> gets put into the content which is stored
in cache.

when the page get's regenerated next time it is simply retrieved from
cached and
just those INT objects get generated ...

my idea for you would be that you let a crawler first hit:

http://www.mycommunitysite.com/

and then:

http://www.mycommunitysite.com/?logintype=login&user=crawler&pass=crawler_secret&pid=123

... 123 has to be the UID of the page/sys-folder containing the FE-users ...

this would create a login-session for the crawler - and if you use a
crawler which is capable of
using cookies it will stay logged in as long as it resends the cookie
... AFAIK httrack is performing
well for this ...
if you use something like "wget" you can store the retrieved cookie in a
file and let succeding calls
use the cookie from the file .... but just "man httrack" ... or "man
wget" for cookies ...

the above parameters in the URL are enough for doing the login ...



greets,
Bernhard


More information about the TYPO3-english mailing list