简体   繁体   English

我如何告诉 TYPO3 不缓存以便它更新数据库值

[英]How can I tell TYPO3 to not Cache so it does update database values

I Created an Extension by using the Extension Builder, created a model, checked all standard actions and aggregated it to root.我使用扩展生成器创建了一个扩展,创建了一个模型,检查了所有标准操作并将其聚合到根。 I installed the extension.我安装了扩展。 I also selected a storage place.我还选择了一个存储位置。 I included the static template, created a new page and put the frontend-plugin in and So as far as I know very standard.我包含了静态模板,创建了一个新页面并将前端插件放入,据我所知非常标准。

And when I started testing, it usually doesn't update old values if i create edit or delete them.当我开始测试时,如果我创建编辑或删除它们,它通常不会更新旧值。 Then I check the database, there is everything just fine and as i expect things to be.然后我检查数据库,一切都很好,正如我所期望的那样。 What always helps is clearing the frontend Cache and reload.总是有帮助的是清除前端缓存并重新加载。

So how can I tell TYPO3 to not Cache this?那么我怎样才能告诉 TYPO3 不缓存它呢?

I am using TYPO3 6.2.我正在使用 TYPO3 6.2。

config.no_cache disables all caches, which makes your site really slow. config.no_cache禁用所有缓存,这会使您的网站速度变慢。

It's better to mark the controller actions as uncached when registering them in ext_localconf.php :ext_localconf.php注册时,最好将控制器操作标记为未缓存:

\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
    'Vendor.Extname',
    'Faq',
    array('Faq' => 'index,detail'),//available
    array('Faq' => 'index')//uncached
);
config.no_cache 

对于所有缓存

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM