Login / Status
developer.Resource
Home . Documentation . Document Library . Extension Manuals
Sponsors
hosted by punkt.deTYPO3 and Open Source Magazine

1.6. Hints and pitfalls

Identifier decisions

The full identifier is hashed with md5() in enetcache. Main principle for the identifier of a cache entry is: Keep it as small as possible but add as much as needed to create an unique identifier. Typical values that should be considered to include to a identifier are:

  1. TS configuration, maybe merged with flexform values. Ideally stripped down to some values

  2. Some piVars, if the plugin produces different content for given values

  3. FE groups, if the plugin creates different content for different groups. Sometimes group membership itself is irrelevant and it's only “logged in content” and “non logged in content”. Then a boolean flag should be added to the identifier and only two different cache entries will be created for this plugin.

  4. Avoid to include the page ID and content-element ID in the identifier. This would force a single cache entry on every page with this plugin and negates a nice advantage of the plugin cache.

Tag decisions

Tags are important to be set right especially for long living cache entries. It's usually a good idea to add “tablename”_”uid” as tags for every handled record. This will ensure the cache entry is dropped if those records are changed in the BE. List pages should proably add “tablename”_”new”, too.  Those cache entries are dropped if new records  are added to this table. EXT:enetcacheanalytics is also very useful to debug dropping and to see which tags have been added to a cache entry. Warning: Don't use enetcacheanalytics in production environments, it slows down the whole system and does tons of insert queries for every page hit.