Project

General

Profile

Actions

Feature #24888

closed

Add a cache for typoLink()

Added by Vladimir Podkovanov about 13 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-01-29
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Sometimes a page has many same links, for example list view for a product could has links from a preview image, from a title and a teaser description, all links going to detailed view of a product and all links has the same typoscript config.

In such cases typoLink() function can benefit from inner cache – if typolink config has same md5 from serialized config, then url and tag params is not being calculated again (it is rather big function) but retrieved from cache.

Content being placed inside A tag of course not cached, only tag.

Such cache is essential when TS-templates are heavy used - if php code in plugin is involved only in data preparing and all rendering being done in template then we have to call typolink many times with same config or to use ugly workaround "caching" with help of LOAD_REGISTER

(issue imported from #M17401)


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #24389: speed up typoLink function by caching domain recordsClosedSteffen Gebert2010-12-22

Actions
Is duplicate of TYPO3 Core - Bug #17421: tslib_cObj::typoLink() is slow / patch to add cachingClosed2007-06-27

Actions
Actions #1

Updated by Fedir RYKHTIK about 13 years ago

It's a reasonable proposition.

We could cache the "href" value, link without tag. The type of the cache could be global : for all pages, or only for current instance of the page. If the cache is global, it's possible to store the typolink in the database, or in typo3temp directory, which is more interesting from the point of view of workload.

The more optimal way - is to create the systeme of caching for different subobject, and to implement not only with TypoLink, but with all the objects and subobjects, generated by TypoScript. Eachtime object is found on the page, it's attributes are sorted, imploded and hashed in sha256sum. If there are no such object in registry, the object would be stored into the filesystem cache.

Such caching could be implemented even for *_INT objects, because the instances could repeat each other.

Actions #2

Updated by Dmitry Dulepov almost 12 years ago

  • Target version deleted (0)

This will not work if you have to create links across domains or links to restricted pages.

Actions #3

Updated by Alexander Opitz almost 11 years ago

  • Status changed from New to Closed

Closing as duplicate of #24888

Actions

Also available in: Atom PDF