[TYPO3-mvc] blog_example - caching issues?

Andreas Rieser A.Rieser at T3site.com
Wed May 20 16:23:15 CEST 2009


Hi,

thanks for the interesting posts. I think looking back at what is  
possible now clearly shows, what should be improved:

Now you are able to cache or not to cache something - due to TYPO3's  
abilities like COA's continaining COA's AND COA_INT's you can go  
quite into detail here which is a good concept. But most people take  
the other way around - cache everything and clear the whole cache for  
a page if it is "mandatory" - even if it would not be necessary to  
clear the whole page cache. Take the news example - the  
TCAclearCacheCMD here is a workaround for clearing the cache of pages  
containing list and single views. But is this really necessary if you  
edit one news record? No, it isn't - then the cache for the list view  
and the single view for only that one record has to be cleared - more  
is not sufficient. If you are only adding a new news record it even  
get's worth. You would have to clean the cache of the list view -  
nothing more. Instead of this TYPO3 will clear the cache for the list  
and for all single views.

There might come up the question, why it is implemented this way now.  
Well, there was no MVC around ^^ - so there was nothing else  
possible. The magic in my first post is only possible with MVC!

@sebastian:
You are right, it will not be possible to cover everything with that  
and there should be a simple possibility to clear your caches anytime  
you need it. But I dislike the idea to make this the default way  
again - cluttering clearCache calls all over your application code or  
implementing a TS solution is not necessary any more with MVC in  
place. I think covering two cases here might be a great thing which  
might be not too hard to implement because of the cHash:
- if you call this clear whole cache for that (and that and that...)
- if you call this clear the cache for the current record in that  
(and that and that...)   -> I know, what is the current record here?  
it should be possible to use any parameter available... this could be  
a post, a comment, whatever...
This will cover most of the applications I can imagine - let me know  
if I am missing something - and if there is something not possible,  
you could use the bad old way or make clearCache calls in your  
application code.

@steffen:
With this the extension author has a great toolbox and could use the  
best approach suitable for his needs.

@robert:
this annotation stuff rocks and enables the things that are currently  
possible with mixing COA's and COA_INT's - and I can imagine that  
this goes even further with FLOW3...
well, but it doesn't enable you to clear the cache of the single view  
of a single news record.

I don't think this too much magic - this is possible and simple to  
configure in one place (yeah, ok - my 30 second approach is definetly  
not the route to go when it comes to an intuitive syntax...=) ).
Not to forget: you are not forced to do it this way.

Btw.: Sebastians post was kind of amusing for me - writing something  
great like fluid and then complaining about too much magic in my  
simple idea - that made my day.

Looking forward to your answers and an interesting discussion,
Andreas





More information about the TYPO3-project-typo3v4mvc mailing list