Project

General

Profile

Actions

Task #55541

closed

Avoid redundant data in page cache

Added by Bernhard Kraft almost 11 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Caching
Target version:
Start date:
2014-02-01
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.3
Tags:
Complexity:
Sprint Focus:
On Location Sprint

Description

When a page gets cached this is done regardless of any logic. Pages are "stupidly" cached without taking the data they contain into account.

This results in the following issues:
  • When a page (HTML) is the same for logged-in users and not-logged-in users the whole HTML code will still get stored twice.
  • When two or more pages share the same TypoScript template it will get stored again and again with each page cache entry.

This results in the page cache growing linearely with each cached page altough large parts of the data (TypoScript) is redundant. If a FE-Login is possible the situation is even worse: Normal content pages without access restrictions will double the amount of cached data.

Having a large page cache impacts negatively on performance as MySql (and filesystem) won't be able to keep as many page cache entries in memory!

Solution:
Make a caching frontend and backend especially for caching pages. This frontend and backend can have intelligence for handling those redundancies.

A proposed soultion is attached and pushed to the review server. The proposed soultion created a frontend/backend cache. When a page shall get cached the HTML and the serialized TypoScript will get stored each by itself using a hash of their data as identifier. The orginal page cache entry will only contain a surrogate (class PageCacheEntry) for replaced big data value.

The attached PDF shows the differences in storage usage for a 40 page site. The page requests 0-40 are made without login. Request 40-80 (~) are made with a logged in user.


Files

pageCacheRedundancy.diff (18 KB) pageCacheRedundancy.diff Diff with changes Bernhard Kraft, 2014-02-01 02:57
PageCachePatch.pdf (37.4 KB) PageCachePatch.pdf PDF showing cache size Bernhard Kraft, 2014-02-01 02:57
Actions

Also available in: Atom PDF