About the cache of the Smarty template. I enabled the cache requiredirname (_ FILE _). run. inc. php; global $ _ tpl; if (! $ _ Tpl-& gt; is_cached (member. tpl, $ _ SERVER [REQUEST_URI]) {$ _ membernewMemberAction (); $ _ member-about the cache of the Smarty template.
I enabled cache
Require dirname (_ FILE _). '/run. inc. php ';
Global $ _ tpl;
If (! $ _ Tpl-> is_cached ('member. tpl', $ _ SERVER ['request _ URI ']) {
$ _ Member = new MemberAction ();
$ _ Member-> action ();
}
$ _ Tpl-> display ('member. tpl', $ _ SERVER ['request _ URI ']);
$ _ Tpl is the smarty template and MemberAction () is the controller. In simple terms, it is in member. php? Action = showupdate: the file data is modified so that it jumps to member. php? Action = show, but because of the cache relationship, it directly loads member. php? Action = show cache file in member. php? Action = show does not see the data changes, but the database data is modified. I want to know how to update data in a timely manner. the modified part is not cached.
------ Solution --------------------
Smarty has a tag that is not cached {insert}
Another method is member. php? Action = after showupdate is executed, call the smarty method to update member. php? Action = show cache