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:
It's not possible, because blog post is cached.
Thanks again.
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.