Project

General

Profile

Actions

Bug #22842

closed

Caching framework: Backport PhpFrontend from FLOW3 and refactor FileBackend

Added by Christian Kuhn over 14 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Category:
Caching
Target version:
-
Start date:
2010-06-09
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.4
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

FLOW3 implemented a PHP Cache Frontend which allows for effective caching of PHP code which is included with require_once() instead of runtime parsing with eval(). This significantly improves speed when used in combination with an opcode cache such as APC. Currently only the FileBackend supports PHP code caching.

This patch ports the changes to v4. This is very handy if extensions like extbase decide to implement things like AOP, where PHP code is generated on the fly and needs to be cached effectively.

Sum up of changes:
- Added PhpFrontend class
- Added PhpCapableBackend interface and implemented in FileBackend
- Refactored the FileBackend to use a different storage strategy
- Refactored the FileBackend unit tests.

Important detail:
As far as I can see by now, the new storage strategy leads to very fast set(), get() and require_once() calls (straight usage of btree capabilities in all recent filesystems), while flushByTags() and findIdentifiersByTag() will be slower with many cache entries. Thus, doing a lot of entry invalidation with tons of entries is probably not a good idea with this backend. I'd recommend the DbBackend for content caches (with properly configured mysql) for now and I'll try to come up with some numbers, documentation and use cases if and when MemcachedBackend and FileBackend can catch up.

(issue imported from #M14666)


Files

14666_01.diff (64.1 KB) 14666_01.diff Administrator Admin, 2010-06-09 03:34
Actions

Also available in: Atom PDF