Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Coutputcache & Header

$
0
0
Hello everyone,

I'im using COutputCache and I just wonder how can I refresh cache when user is logged and when user clicks "Logout"? I think there is a better way instead of saving and removing users in a table.

Thanks.

EDIT:

Also, I would like to know how can I update my blog post (example). There is a column "total_views", and If my page is cached, how can I do:

$blog=Blog::model()->findByPk($id);
$blog->total_views=$blog->total_views+1;
$blog->update();


It's not possible, because blog post is cached.

Thanks again.

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>