[TYPO3-v4] ExtDirect and Caching vs. multiple domains

Andreas Kiessling kiessling at pluspol.info
Sun Nov 21 16:29:41 CET 2010


Hi,

on my local machine i stumbled upon a problem with the ExtDirect 
implementation.
It stores the ajax url in the content column, but the hash for the 
cached array only consists of
- string ExtDirectApi
- namespace
- settings (that means all registered ExtDirect handlers)
- TYPO3_MODE

Now open your local 4.5 setup with localhost and let the cache be filled 
up by using the live search or the CSH, and then open the backend with 
another host, e.g. 127.0.0.1 and you will get an ExtDirect exception, 
because it called the server with the wrong hostname. (I suppose you 
won't have extCache disabled to reproduce this)


While this is very easy to fix within the getApi method of the ExtDirect 
implementation by just including the current host for the cacheHash 
value, i can imagine that it could also be a problem for other cache 
implementations, that store url settings.

You would always have to explicitly include the host when creating a 
hash value, which could be avoided by adding that information within the 
cache table or by modifying / creating a new hash with the host 
information in the getHash / storeHash methods.

I currently do not know about any other extension or core function that 
uses the cache this way, but for sure, there will be some in the future ;)

Any ideas where to best fix this? Or is my scenario too unlikely so you 
just have think of it when using a cache?

Regards,
Andreas


More information about the TYPO3-project-v4 mailing list