cache | sitefinity | cms

Sitefinity - Caching issue for pages with NO CACHING profile

If you experiencing cache issue for pages with No Caching profile in Sitefinity, check this post.

Abhith Rajan
Abhith RajanDecember 18, 2017 ยท 2 min read ยท Last Updated:

ISSUE

In our Sitefinity project, we have a page โ€œApplicationโ€ for which we set view permission to allow only users having role โ€œUSERSโ€. (i.e only USERS can access the page).

Once USERS logged in, we are redirecting them to the Application page, once they are logged out, we are redirecting them back to the homepage.

The problem is after log out and they redirected to the homepage, if they hit BACK button in the browser, the Application page is still accessible (from CACHE), and if we reload, then only it redirects to the login page.

The Application page caching is set to NO Caching in the Sitefinity but still this behavior.

The expecting behavior is once user logged out and if they hit back button, we need to redirect to the login page.

Solution

You must go to the No Cache profileโ€™s parameters, to do that go to

Administration > Settings > Advanced > System > Output Cache Settings > Page Cache Profiles > No Caching > Parameters and click Create new. (see the picture on top)

On the page that loads enter:

Key: setNoStore
Value: True

Then Save changes.

Now click on the No Caching Profile, scroll to the bottom of the page and click the โ€Enabledโ€ checkbox, then Save changes.

Now Sitefinity must be restarted.

This should fix the issue you are having.

This page is open source. Noticed a typo? Or something unclear?
Improve this page on GitHub


Abhith Rajan

Written byAbhith Rajan
Abhith Rajan is a software engineer by day and a full-stack developer by night. He's coding for almost a decade now. He codes ๐Ÿง‘โ€๐Ÿ’ป, write โœ๏ธ, learn ๐Ÿ“– and advocate ๐Ÿ‘.
Connect

Is this page helpful?

Related ArticlesView All