Skip to main content
Topic: Hive seems to be strongly cached? (Read 1566 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Hive seems to be strongly cached?

So since I've installed RC1 I've noticed that if I have the minify option on that changes to don't show up like they did in beta 1.  If I update a script or css and have the hive system disabled changes show up.  But when I go back to hive the old version shows up again.  Even if I delete all the hive files and restart apache to clear apc.  I'm confused.

Re: Hive seems to be strongly cached?

Reply #1

I've just done some tests.  Editing topic.js causes a new hive cache tag, but the edits are not showing up.  Even deleting all the hive files still makes the old version of topic.js show up.  I'm not sure where it's caching the old copy.  Opening it with an editor shows the new copy, so it's not the server file system.

Re: Hive seems to be strongly cached?

Reply #2

You're calling a third party website closure compiler???  That's where the caching is occurring.  I have no idea what that site does to decide when it's ok to actually recompile your code but clearly it's not very smart. 

Code: [Select]
                //$fetch_data = $this->_closure_code_url();
                $fetch_data = false;

Makes it actually work reliably because it forces it to use the local one.  Ugh.  This change clearly needs some more work to verify it's actually using the data you're sending.  I've verified the file change is being detected locally.  The file is being read in correctly.  It's just that third party site that's screwing things up.

I had this problem from the start with RC1 where the goto dropdown was still using styled selects even though they were all gone from the code.  I was very confused.  Then it happened again modifying topic.js tonight.  Very ugly.

Re: Hive seems to be strongly cached?

Reply #3


I don't think the issue is on the closure compiler end of things (it is a google service).  That function will try a number of things, but given what you showed fixed your issue, it is an issue with the initial step so we don't have to look far.

In step one the service is sent a request to fetch the files from the site (so no data is sent from the site to the service).  If you are getting back the old files, it means your site is serving up the old files to the service when they are requested (maybe expires headers or varnish or other)

Not sure if we can add a cache buster to the string (well we can, just not sure if the service will work with that), worth a try ...
Code: (from) [Select]
				$post_data .= '&code_url=' . urlencode($file['url'] . '/scripts/' . $file['basename']);
Code: (to) [Select]
				$post_data .= '&code_url=' . urlencode($file['url'] . '/scripts/' . $file['basename'] . $this->_archive_stale);

Re: Hive seems to be strongly cached?

Reply #4

I'll give it a try this evening.  I do have expires headers set on js and css pages via .htaccess.


Re: Hive seems to be strongly cached?

Reply #5

Doing a few back and forth tests this evening the staler does seem to do the trick.