[TYPO3-dev] use cache for internal data of a custom extension
Ries van Twisk
typo3 at rvt.dds.nl
Sat Mar 4 16:11:44 CET 2006
Martin Ficzel wrote:
>Allan Jacobsen schrieb:
>
>
>>Hi Martin
>>
>>I don't know if you are aware of this, but mysql has internal caching of query results, so you might not find any speed improvement, if your queries are run very often.
>>
>>
>
>good point. thats not the best point for optimizing
>
>
Bad point... First SQL was NOT designed for speed second not all RDMB's
do have a query cache.
>another suggestion
>
>the extension is providing some information as xml pages.
>these types are called from a flashfile with url's like this
>
>
>
>>index.php?id=2&type=341&feature=get_objects&level=1
>>
>>
>
>the result of this request nearly stays the same so it could be cached
>without problems (there are only a limited number of levels available)
>
>onother request for the same pagetype
>
>
>
>>index.php?id=2&type=341&feature=get_active&level=1&signature=foobar
>>
>>
>
>will perform a search operation and cannot be cached.
>
>question: how can i manage to cache the first request but not the
>second. i cannot use chash since the url's are build within flash an not
>with the typolink function.
>
>regards Martin
>
>
>
>
We are properly also in the need for a 'private' caching system for
querys, in my case i also need to do a lot of searching and sorting in
complete tree's with +200 pages and do that about 8 times. My plugin
'knows' when data has been changed and thus I need to refresh upon request.
So I need to make a USER_INT object and check this and cache the result
for myself.
New Idea...
Ideally it would be nice that all USER objects do have on extra
function, somthing like function hasNewData()
Which will retrun TRUE or FALSE.
That means that ALL USER objects need to be initliased (more overhead)
with maby get/post parameters?!?!?!
And the plugin is responsible for return TRUE (Yes I have new data) or
FALSE (NO, use my cached data).
When the plugin returns FALSE then typo3 uses the cached version of the
last time
When the plugin return TRUE then simply user_Func (mostly main) will be
called an the plugin generates new content which will be cached again.
For migration that means that for USER objects the default return value
will be TRUE, and for USER_INT objects it will return FALSE.
In 'some' version of typo3 we can migrate USER_INT back to USER objects
and have one object type and the plugin can decide?
I don't have anything about this idea but this idea...
What do you think?
Ries
--
Ries van Twisk
Freelance Typo3 Developer
=== Private:
email: ries at vantwisk.nl
web: http://www.rvantwisk.nl/
=== Work:
email: ries at livetravelguides.com
web: http://www.livetravelguides.com
More information about the TYPO3-dev
mailing list