Picture of Dick Moore
Cache trouble
by Dick Moore - Wednesday, 18 June 2014, 12:30 PM
 

As we are developing our course we have a need to make multiple releases.

I am doing the usual thing of 

1. building and test the course

2. tar up the build directory

3 ftp the tar unzip the build file

4. use a symbolic link to point at the new release from inside the web root

Its all working fine except that I cant find a way to clear the users cache, if the sym link is not there I get a 404 but if it is there the users sees the old contents not the new.

Renaming the symlink to be say course12  all works.

Its not the server cache as far as I can tell, I restarted the web server

Is there a way that I can force a refresh in the clients browser without telling them to clear their cache?

Thanks

 

 

 

 

Picture of Dick Moore
Re: Cache trouble
by Dick Moore - Thursday, 19 June 2014, 12:05 PM
 

More information

Using chrome if I open an incognto window I get the new course material, If I dont I get the old content.  Hitting F5 does not do a refresh.  The consequence would seem to be that we will have to insist that the learner clears their content cache in the browser which means that they loose a lot of stuff.

If this is not addressed then the upshot will be learners getting a different experience from the same url which enivatabley will result in help desk calls.

Is there a way that I can formally log this or will you guys do it for me?

Thanks

Ps I may have got this wrong if thats the case then I apologise in advance.

 

 

Picture of Matt Leathes
Re: Cache trouble
by Matt Leathes - Thursday, 19 June 2014, 12:45 PM
 

Surely this is a server problem. I think you need to check what the expiry settings on your web server are https://www.google.com/search?q=apache+expires&ie=utf-8&oe=utf-8

Picture of Dick Moore
Re: Cache trouble
by Dick Moore - Thursday, 19 June 2014, 1:59 PM
 

Hi Matt

I think the answer is to put in a bit of meta data into the index.html that gives the content an expiry date.  The great thing about adapt is that it can be loaded across almost any webserver - we have been running it from dropbox apache2 lighttpd  

You would expect pressing F5 content reload to ignore the local cache and do a refresh this is not currently working.

It needs a bit of looking at and if addressable without forcing people to do stuff on their web server that would be preferable as so many people use hosting services that are shared.

 

 

 

 

Picture of Matt Leathes
Re: Cache trouble
by Matt Leathes - Thursday, 19 June 2014, 2:56 PM
 

F5 rarely forces a cache refresh I'm afraid (unless the content has expired - see below). It just reloads the page.

I think sometimes CTRL+F5 will do the job but I wouldn't rely on this.

Eventually the content in the cache will expire and then a visit to the page or a press of F5 will trigger it to be loaded from the server.

Just to confuse matters, some web servers also cache data! IIS used to have a very annoying habit of caching SWF files.

You can control the expiry of the index page using metadata but I'm not sure this would affect any assets loaded into the page.

An .htaccess file might be better: https://www.inmotionhosting.com/support/website/htaccess/apache-module-mod-expires