Project

General

Profile

Actions

Task #55541

closed

Avoid redundant data in page cache

Added by Bernhard Kraft over 10 years ago. Updated almost 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 #1

Updated by Gerrit Code Review over 10 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27222

Actions #2

Updated by Mathias Schreiber over 9 years ago

  • Target version changed from 7.0 to 7.1 (Cleanup)
Actions #3

Updated by Wouter Wolters over 9 years ago

  • Status changed from Under Review to Closed

Bernhard Kraft Jun 12, 2014

Abandoned

Should get implemented in an extension.

Actions #4

Updated by Susanne Moog almost 7 years ago

  • Sprint Focus set to On Location Sprint

Bernhard mentioned this could be a topic for the coding night on T3DD17 - for any questions feel free to contact him.

Actions

Also available in: Atom PDF