function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
davecrusodavecruso 

Cache NOT flushing?

Hi all, 

 

We're developing two Sites; they're exactly the same except for the fact that on ONE Site, the cache is flushing, and on the OTHER page, the pages are NOT refreshing. Cache settings are all set to false, and expires=1. Any ideas?

 

Thanks!

--Dave 

Best Answer chosen by Admin (Salesforce Developers) 
BulentBulent

it seems like the cache is expired and I'm seeing the site is inactive page.

if you don't want caching then please just set cache="false" without the expires parameter on both at the page and the template level, and activate the site and let me know if you still have the same issue. We can get on a call and diagnose if the issue continues (bcinarkaya@salesforce.com) 

All Answers

BulentBulent

If possible can you publish the URL?

also can you confirm that the site pages with cache="false" was never rendered without the cache attributes or with cache="true" and expires="xxx"

 

if you don't specify the cache attributes then the page is cached by default 10 minutes, so even if you set the attribute after it's cached by default it won't reflect your changes until the 10 mins expires 

davecrusodavecruso

Thanks for your reply -- here's the page: 

 

http://citizenschools.force.com/props

 

-- we may have published (originally, over 24 hours ago) the page with no cache attribute; this was changed a long time ago, however, and the page is still not updating. 

 

The force.com page code contains differences than the page displaying publicly... (so that we can tell when the page refreshes). 

 

Thanks!

--Dave

BulentBulent

Couple of observations:

1- site is not active at this point, but the main page seems like cached for 10 minutes. It will expire on 9:23am pst. So you should see the in maintenance page at that time if the site is still in active

2- home page uses site template so the caching on the template is the valid one   

3- seems like you created your own authentication method which we strongly suggest using customer portal for authentication as a best practice. Or Just directly use Customer portal since there is no public site other than login page.

4- seems like this is an intranet app so I suggest using IP restriction

 

Message Edited by Bulent on 06-26-2009 09:23 AM
glencglenc
 <apex:page cache="false" expires="1" showHeader="false" id="Props_SiteTemplate">we aren't using any authentication just guest access, the login on the page just looks up the contact id from the text entered and navigates to another page passding the id on the querystring. we have tried removing all the pages, server still serves old page cahcing is set to false - have also tried true and expires=1 this has only  been happening on this particular site our other site is fine and changes show up quickly there.
BulentBulent

it seems like the cache is expired and I'm seeing the site is inactive page.

if you don't want caching then please just set cache="false" without the expires parameter on both at the page and the template level, and activate the site and let me know if you still have the same issue. We can get on a call and diagnose if the issue continues (bcinarkaya@salesforce.com) 

This was selected as the best answer
glencglenc
Think that got it, setting the cache=false in the template appears to have been the problem
Scott.MScott.M

What if in some contexts we want caching and in others we don't. For example in more priviledged preview mode, caching should always be disabled. If I set cache="false" and then set expires to some value it should not cache, otherwise we won't have any way of dynamically turning on and off the cache based on context.