TYPO3:禁用特定插件/扩展的缓存 [英] TYPO3: disable cache for specific plugin / extension
问题描述
我构建了一个扩展程序和一个插件,前端用户可以在其中编辑个人资料,但是我发现了一个关键问题:
I built an extension and a plugin where frontend-users can edit their profile but I noticed a critical issue:
在编辑个人资料"下,用户可以看到有关另一个甚至没有登录的用户的完整信息.显然,该表单已缓存在服务器上,因为添加后:
Under "Edit profile", users could see the full information about another user who wasn't even logged in. Apparently the form was a cached on the server because after adding:
config.no_cache = 1
它没有再发生.现在的问题是在整个网站上都禁用了索引编制.
it didn't happen again. Now the issue is that indexing is disable on the whole website.
有没有一种方法可以仅为此特定扩展名/插件禁用缓存?
Is there a way to disable caching only for this specific extension / plugin ?
推荐答案
在您的ext_localconf.php
中应该有这样的内容:
You should have something like this in your ext_localconf.php
:
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
$_EXTKEY,
'List',
array('User' => 'list,editProfil'),
array('User' => 'editProfil') // Uncached actions
);
在这里进行解释: https://docs.typo3.org/typo3cms/ExtbaseFluidBook/4-FirstExtension/7-configuring-the-plugin.html
这篇关于TYPO3:禁用特定插件/扩展的缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!