[TYPO3-english] The cost of caching

Stephan Schuler Stephan.Schuler at netlogix.de
Fri Feb 20 12:33:41 CET 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hey Graham.

There are a lot of different caches, each trying to solve a distinct problem. You can't blame caching in general for using any resources at all because most of them don't use that much.

On top of that, like Viktor said, there are different types of cache backends. There is the database backend, the file system backend. There is a redis backend and a memcached backend. It can be a hard task to find the perfect fit since every cache area might perform well with one cache backend and give some drawbacks with another.

In general, you should be more specific about which actual cache bothers you. If it's not performance that annoys you but just resource utilization that annoys your hoster, then it could be enough to just target the one cache he is talking about. I really doubt he is troubled with e.g. the page cache storing nearly completely rendered FE pages.

Most TYPO3 caches don't increase "database performance". There are "some" of them trying to reduce the number of database queries. But those usually aren't configured to use database backends, because replacing one simple SQL query with another slightly easier one isn't exactly a huge performance boost.
So on to the "is the hosting company's suggestion likely to work" question: Most likely not. That really depends on the actual cache they're talking about, but in general there are no database caches just to reduce database access.

One thing that *might* fill your content and url cache tables and cause troubles: Having GET arguments appended to every page that create lots of pages with 99% similar results.

Quick example: Think about a calendar on every page at the top right showing "upcoming events". Every calendar has a "show next month" and a "show previous month" button. Both buttons go to the very same page the user is currently on but add something like "?tx_cal_month=january" and "?tx_cal_month=march" to the URL. That obviously just drops every page 12 additional times to the cache, once per "current month" value. Now add the "year" argument, wait for google to run through your links and see your pages cache growing.

Could you please give us a hint which particular cache tables you are talking about?

Regards,



Stephan Schuler
Web-Entwickler | netlogix Media

Telefon: +49 (911) 539909 - 0
E-Mail: Stephan.Schuler at netlogix.de
Web: media.netlogix.de




netlogix GmbH & Co. KG
IT-Services | IT-Training | Media
Neuwieder Straße 10 | 90411 Nürnberg
Telefon: +49 (911) 539909 - 0 | Fax: +49 (911) 539909 - 99
E-Mail: info at netlogix.de | Web: http://www.netlogix.de

netlogix GmbH & Co. KG ist eingetragen am Amtsgericht Nürnberg (HRA 13338)
Persönlich haftende Gesellschafterin: netlogix Verwaltungs GmbH (HRB 20634)
Umsatzsteuer-Identifikationsnummer: DE 233472254
Geschäftsführer: Stefan Buchta, Matthias Schmidt



- -----Ursprüngliche Nachricht-----
Von: typo3-english-bounces at lists.typo3.org [mailto:typo3-english-bounces at lists.typo3.org] Im Auftrag von Viktor Livakivskyi
Gesendet: Donnerstag, 19. Februar 2015 12:30
An: typo3-english at lists.typo3.org
Betreff: [TYPO3-english] Re: The cost of caching

Hi, Graham

> They have now suggested that I turn off caching as the database engine already does its own, effective query caching.
>
> Has anyone experience of something similar? Is the hosting company's suggestion likely to work? Is there some sort of compromise that will optimise caching performance?

This is a bad idea.
E.g. one of our websites with optimized MySQL serves uncached page 4 seconds and cached for 200 ms only.

As alternative, you may store cachesin Memcached or Redis or any other availabel chec backends [1]

If your hoster doesn't provide acces to any of these alternatives, I'd suggest to chage a hoster.
Or, as poor man's alternative, you can use config.sendCacheHeaders = 1, so your pages are cached by browsers/proxies, but read carefully, when you shouldn't apply this setting [2]

[1]: http://docs.typo3.org/typo3cms/CoreApiReference/CachingFramework/FrontendsBackends/Index.html#cache-backends
[2]: http://docs.typo3.org/typo3cms/TyposcriptReference/Setup/Config/Index.html#sendcacheheaders
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english

-----BEGIN PGP SIGNATURE-----
Version: PGP Universal 3.3.2 (Build 15704)
Charset: utf-8

wpUDBQFU5xuXpp0IwsibV8MBCJpMA/9KnnEo/PHxTbh4l2ySGSRof+GUI2aHWND6
GdGW4ILS8XK21r3cEaNNt4/cDn2vNt5jF7RddmEb8ujV0cKVAXkRLdSulz68jssM
OYaA91Q5SH91akNome2zMDRd65/5vHqbbWbcVdTrGCujxoivvOYPW+O6U6lUZB/r
9YHVjH6yuw==
=dJLB
-----END PGP SIGNATURE-----


More information about the TYPO3-english mailing list