Quick Nav:  Online Store   |   Login | Register

Refreshing of cached page

Rate this topic:

Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
Page 1 of 212 > >>
AuthorMessages
Laurence Neville
<100 Posts
Posts:73


01/08/2007 4:56 AM  

I am finding that updating the content of modules often does not result in updated content for unauthenticated users. I am also occaisionally seeing different content served to different browser types (e.g. IE gets different cached content from FF).

The first problem is really worrying because the site will be edited by people who won't understand why their updates don't "take" (and I can't train them to go and empty the  \Portals\_default\Cache folder !). It is also a consistent problem. The second problem is more strange than worrying, and it is not reliably reproducable. Please say if this is "fixable".

Here is an example (PB 1.4.1 on DNN 4.4.0 on IIS 6.0):

  1. Logged into site using IE7, and went to an already cached page (WEBINFO files present in \Portals\_default\Cache\tabid\nnn )
  2. Edited a Text/HTML module on the page, and clicked Update
  3. In IE, change shows up while logged in (of course)
  4. Checked results for unauthenticated users:
    1. After logging out, in IE, change is NOT seen (page shows content as it was before the edit)
    2. In Firefix 2.0 (running on same machine), with noone logged in, change is seen
  5. Logged into site again using IE7, edited same Text/HTML module
  6. Checked results for unauthenticated users:
    1. After logging out, in IE, change is NOT seen (page shows content as it was before 1st edit)
    2. In FF, 2nd change is not seen (page shows content as it was between 1st and 2nd edits).
    3. The content (for the unauthenticated user) is now different depending on which browser you use!!!
  7. Went to different machine and viewed page with IE7 and FF1.5. Results are the same as above: IE7 shows page content as it was before 1st edit, FF shows content as it was between 1st and 2nd edits
  8. Emptied browser caches ("Temporary Internet Files" in IE, "Cache" in FF) and refreshed pages. Same results.

Here is my PB config:

    page-param="tabid" 
    cache-folder="/portals/_default/Cache"        
    memory-cache-interval="00:04:00:00"
    memory-size-limit="100"
    disk-cache-interval="01:00:00:00"
    disk-size-limit="500"
    compression-algorithm="gzip"
    compression-level="high">

        pattern="rss" excludefrom="All"
        pattern="\.ashx" excludefrom="All"
        pattern="WebResource\.axd"
        pattern="MakeThumbImage\.aspx"
        pattern="571"
        pattern="Download\.aspx"
        pattern="Install"


Here is my HTTPModules section from web.config:

name="UrlRewrite" type="DotNetNuke.HttpModules.UrlRewriteModule, DotNetNuke.HttpModules.UrlRewrite"
name="PageBlaster" type="Snapsis.HttpModules.PageBlaster.PageBlasterModule, Snapsis.HttpModules.PageBlaster"
name="Compression" type="DotNetNuke.HttpModules.Compression.HttpModule, DotNetNuke.HttpModules.Compression"
name="Exception" type="DotNetNuke.HttpModules.ExceptionModule, DotNetNuke.HttpModules.Exception"
name="UsersOnline" type="DotNetNuke.HttpModules.UsersOnlineModule, DotNetNuke.HttpModules.UsersOnline"
name="DNNMembership" type="DotNetNuke.HttpModules.DNNMembershipModule, DotNetNuke.HttpModules.DNNMembership"
name="Personalization" type="DotNetNuke.HttpModules.PersonalizationModule, DotNetNuke.HttpModules.Personalization"
name="HTTPHandler_SSL_PA" type="tt.SSL_Module.HTTPHandler_SSL, tt.SSL_Module"

Here are some maybe relevant Host settings:

1. Advanced Settings:
a. Use Friendly Urls: ON

2. Performance Settings:
a. Page State Persistence: Page
b. Module Caching Method: Memory
c. Performance Setting: Heavy Caching 
d. Authenticated Cacheability: Public
e. Compression Setting: No Compression (Snapsis PageBlaster is used instead to provide compression)
f. Compression Level (Deflate): None
g. Use Whitespace Filter: OFF

John Mitchell
Posts:3353


01/08/2007 7:54 AM  
Hi, Thanks for the detailed post.
I'll answer the simple one first. PageBlaster 1.4.1 uses settings from the browser as part of the cache key (accept-encoding and accept-language), so if they differ between the two browsers it will cache a seperate page. While working on making my site to get it to validate as Xhtml strict I also realised that some people may specifically need different cached versions depending on browsers because of coding the may have placed directly in the page to handle different browsers (like IE comments). So I'll be adding another attribute to allow specifying different browsers.

As far as the unreliliable refreshing. In some cases internal DotNetNuke caching may be the difference in others there may have been an update that was made on one page, but which also is supposed to change a different page. PageBlaster has no way of telling exactly how any specific application may be configured so it also has the option to clear the PageBlaster cache for any page just by holding CTRL while refreshing the browser (or whatever key combination your browser uses to clear cache).
If you do this, and your content still doesn't show the changes you just made then it is probably your application that is caching (DotNetNuke in this case).

One other thing to keep in mind is that caching and updating are kind of like oil and water, if you have a site that is updated frequently then you may want to consider decreasing the time the the pages are cached. Another thing to consider is that regardless if your changes are seen right away to the unauthenticated user they will show up when the cache expires by itself. So the time in between could be used as a "buffer" therby giving your editors a chance to get it just right before "releasing" it with a forced cache refresh (CTRL+F5 in IE)
Laurence Neville
<100 Posts
Posts:73


01/08/2007 8:50 AM  

Thanks for the explanation of how IE and FF could show different content - very confusing initially!

Regarding the other point, can you answer the following:

  • I don't see how DNN's own caching could explain this. The update is always seen by the logged in user, just not by the unauthenticated user. DNN's own caching involves keeping module objects alive in memory, rather than the HTML of whole pages, and it doesn't make any difference whether a user is logged in or not, doesn't it? I also tried clicking Clear Cache on the module menu after doing an update, but this did not make any difference.
  • What do you mean by "an update that was made on one page, but which also is supposed to change a different page"? The experiment I described was really simple - a Text/HTML module instance that lives on one page only.
  • Regarding Ctrl-F5 - in my experience this does not work the way you describe. This is what I get:
    • In IE7 - I don't get the latest content, and nothing seems to happen to the WEBINFO files. In other words, it works just like an F5 refresh
    • In FF - sometimes I get the latest content and I can see the WEBINFO files being deleted. More often Ctrl-F5 gives me the latest content, but then pressing F5 again (or going away and coming back to the page) results in the old page. In other words, Ctrl-F5 gave me a glimpse of the latest content but didn't actually clear the cache.

My overall experience is that its very unpredictable what will happen after any update. Just now I did a series of test changes to my text using IE. For most of them, after logging out of IE, or using FF with noone logged in, the change did not show up and nothing seemed to happen to the WEBINFO files. But one change resulted in the WEBINFO files being changed and the change showed up immediately for both IE and FF.

I love the concept of PB and I love it when I am not making changes! Trouble is it seems like when I hand the site over to a non technical administrator, I am going to have to tell him that his changes will show up "within 24 hours" (or other interval I set), and I can't tell him about Ctrl-F5 (which would be perfect if it was reliable).

I guess if you other customer's aren't seeing this behaviour then there is something odd about my setup. Could it be insufficient memory on the server? Or that I have both a memory and disk interval set in Snapsis.PageBlaster.config? I have noticed that after making a content change or deleting WEBINFO files manually, the browser often "hangs" when browsing to the page as an unauthenticated user - the page never comes up or takes 30 seconds. This is way slower than a page takes to render under DNN with no PB. When this happens the CPU of the webserver is hardly doing anything. This behaviour is particularly frequent with FF and the only way to get the page to come up is to try some other page then come back to this one.

John Mitchell
Posts:3353


01/08/2007 9:48 AM  
In DNN, when you cache a module any user who has edit rights never sees the cached version of the module. You might try your tests with no cache time set on the module to remove this as a possibility.

The item I was talking about with the other page was just an example, like when you are showing "What's New" on your home page, but what's new is actually built from other pages.

CTRL+F5 always works for me. I haven't heard anyone else having issues with it but that doesn't mean there aren't any. If you want, I can look at your setup and see if I can figure out what is happening. Memory should only be a factor if you are not seeing pages get cached, and it is normal to have both a Memory cache and a Disk cache to back that up.

One other thing that helps to troubleshoot is to look at the response headers of your page using something like Fiddler. PageBlaster sets a header that tells the version and also where the page was retrieved from. It looks like this:

X-Snapsis-PageBlaster:v:1.4.1;c:-

The c:- on the end indicates that it was not retrieved from cache, if it is c:m then it is from memory, or c:d is from disk.

Laurence Neville
<100 Posts
Posts:73


01/08/2007 10:18 AM  
I just tried setting the module cache time to zero (and touching web.config to cause a restart), but still got the same problems. I would really appreciate it if you had a look at the setup! Can I email you the details you will need? What address?

Another thought - could the language my browsers are using have any effect (en-gb)?

Last question for now - I always thought that DNN's native module caching was caching the objects created by ASP.NET, rather than any HTML. Is it actually the HTML rendered by the module for unauthenticated users that is being cached?
John Mitchell
Posts:3353


01/08/2007 11:51 AM  
You can reply to the e-mail notification you get from this forum directly to contact me with details.

I don't think it is the languge, but the version you are using caches every language seperately so it could have something to do with it.

Yes, DNN caches modules using output caching in ASP.Net. What gets cached is the raw HTML from that "fragment" of the page. When you are logged in as an editor, all caching of modules is bypassed, but when you log out you may get the old cached fragment.
John Mitchell
Posts:3353


01/08/2007 11:56 AM  
I just noticed you are using DNN 4.4.0

I do know that there are some caching issues in that version. I don't know if it relates to this issue, but we should be able to find out.
One thing you can try is to change the DNN module caching to "memory" under host settings. It was changed to default to "file" in version 4.4.0 and I believe it has caused problems like this.
Laurence Neville
<100 Posts
Posts:73


01/09/2007 8:25 AM  
As above - Module Caching Method is already set to Memory
John Mitchell
Posts:3353


01/09/2007 9:43 AM  
Hi Laurence,
After getting the login to your site I have tried updates on that page and can not reproduce the issue you are describing. I was able to get an old page once after updating with the edit-in-place feature, but using CTRL+Refresh brought up the page right away.

Is it possible that there is a proxy server caching something between you and your server?
Laurence Neville
<100 Posts
Posts:73


01/09/2007 11:42 AM  
The network guy says "no", but I am going to do my tests from another location to see if anything changes. Thanks for your work on this!
Laurence Neville
<100 Posts
Posts:73


01/12/2007 2:02 AM  
I did the tests from home (definately no proxy server) and got the same kind of results. The 2 problems are intermittment - sometimes after doing an edit the cache is refreshed immediately, and sometimes it is not; if the cache is not refreshed, sometimes pressing Ctrl-F5 results in a cache refresh, and sometimes it only gives a glimpse of the uncached page and then F5 gives you the cached page again.

After confirming that the module cache time was zero, I did a series of three changes using IE7 and then logged out and checked the results in IE and FF (there were three "1"s in a text module, for each login I deleted one of the "1"s). This is what happened:

After the first edit (the "real" uncached content now is "11"):

When logged off, in IE7, the page shows "11" (i.e. the cache got refreshed)
When logged off, in FF, the page shows "111" (i.e. I am seeing a cached page from before the edit)
Pressing Ctrl-F5 in FF shows me the page with "11" and pressing F5 again gives me same result (i.e. the cache got refreshed)

Not too bad, but then I do the 2nd edit:

When logged off, in IE7, the page shows "11" (i.e. I am seeing a cached page from before the 2nd edit)
When logged off, in FF, the page shows "11" (ditto)
Pressing Ctrl-F5 in IE7 has no effect, the page still shows "11" (i.e. cache is not refreshed)
Pressing Ctrl-F5 in FF - the page shows "1" (i.e. the "real" uncached content), but pressing F5 again gives me the cached page again with two "1"s

Can you look at this some more?
fjreinders
<20 Posts
Posts:2


01/14/2007 9:56 AM  
Had the same problem, you should dive into what operating system and IIS version you are using.
Old 4.03 and new 4.4 sites had the same problem after migrating from IIS5 to IIS6.
Not solved yet.
John Mitchell
Posts:3353


01/14/2007 10:12 AM  
I'm still looking into this. But in FirFox you might try CTRL+R or SHIFT+Refresh, I think it uses different key combos to send the cache-control header to the server. PageBlaster looks at the cache-control header to decide if cache needs to be cleared.
fjreinders
<20 Posts
Posts:2


01/15/2007 10:31 AM  
It looks like the problem is solved by setting :Run WWW service in IIS 5.0 isolation mode : ON.
You can find this on IIS6 on the properties of folder Web sites, tab page service
Tried everything else, including disabling disk write cache, but this solved the problem. Have to dive into this option further.
Laurence Neville
<100 Posts
Posts:73


01/16/2007 4:26 AM  
John - in FF Ctrl-R does a regular refresh; Shift+click Refresh button seems to do a "hard refresh" (as does Ctrl-F5). However none of these make any difference - after doing a "hard refresh" in FF (with any key combination) I get the "real" uncached content, but then pressing F5/Refresh/Ctrl-R again again gives me the cached page again.

fjreinders - I am in IIS 6.0 (in Win 2003). I tried turning on that setting but it made no difference at all for me. I still get all the behaviours I described above. Thanks for suggesting this but there must be something else going on over here.
John Mitchell
Posts:3353


01/16/2007 8:02 AM  
Hi Laurence,
I'm going to add some trace logging to the application so we can get to the bottom of this.
I should have it in the next couple of days if you would like to test it.
Laurence Neville
<100 Posts
Posts:73


01/16/2007 12:03 PM  
Definately!
Laurence Neville
<100 Posts
Posts:73


01/27/2007 3:44 AM  
Any update on this?
James Bauer
<20 Posts
Posts:8


01/31/2007 7:38 AM  
I tried to perform a few trace logs myself, since I was also experiencing the same isses. Here are my findings:

I am using IE 6
I have memory caching set to 0, and disk caching set to 99 days... (just wanted to perform a proof of concept with only two variables - disk cache and no cache)
I am still waiting to hear back from my shared host to see if the WWW service in IIS 5.0 isolation mode is set to 'ON'

1. After making changes to a page, logging out then viewing the page, it loads from the cached disk (header shows c:d ), and doesn't show the changes.
2. After pressing ctrl-F5, it shows the changes (header shows c:-)
3. Clicking on a link to reload this same page yeilds the unchanged results (header shows c:d)
4. Pressing just F5 now shows the changed results (header shows c:-)

Apparently, the disk cache is not getting updated after I made the changes, and based on my settings will only force a disk cache change in 99 days, unless I manually go to the .../DesktopModules/Snapsis/PageBlaster/Cache/tabid and delete the applicable cached page files.

You mentioned that on postbacks, the cache is automatically updated for that given page, when I am logged in. This is true (.../Home/tabid/72/Default.aspx). However, when I log out, the page (.../Home/tabid/72/Default.aspx) doesn't seem to be updated in the cache (header shows c:d). Again, if I press just F5 now, it then loads fine, but isn't pulling from disk cache (header shows c:-).

I hope this helps to shed more light on the problem...

Jim
John Mitchell
Posts:3353


01/31/2007 9:45 AM  
Sorry guys, I have been side-tracked on some other projects.

I'll get back on this today.

Thanks for the additional info Jim.
Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
Page 1 of 212 > >>

Forums >Snapsis Product Support >PageBlaster > Refreshing of cached page



ActiveForums 3.7
Powered by: Snapsis Software