Wrote a plugin to grab the data and strip out all the fields I don't need and cache it, then another block which is not cached which grabs that cached data and converts it to the output and correct time for each user.

Exactly as the title says, this hook aims to improve upon the "Anti-Cache Hash" which IP.Board now has to try and stop web browsers caching old CSS and javascript files.

IP.Board's default implementation will only ever realistically change the hash when upgrading to a new version of IP.Board. This is not ideal, especially when you make changes to your skins as the changes will not be reflected without everyone who visits your site, first clearing their browser cache.

What this very lightweight and simple hook does, is replace all instances of the hash with another one (based on the original hash), but it will change based on the timestamp of when the skin the user is viewing was last updated.

You may find you need to re-cache the skin after editing it, to force the timestamp to update if you do not see your CSS changes straight away.

Basically, if you are having issues with CSS changes not making it to your users without them clearing their browser cache, give this hook a try and get behind our feedback thread for getting something like this added to a future IP.Board release:http://community.invisionpower.com/topic/367011-anti-cache-hash-should-change-on-edit-or-re-cache/

IPB 3.4.x

I'm pleased to say this is not needed for IPB 3.4.x, as IPS have implemented this fix themselves :smile:

Which means that its fairly pointless, as it will only realistically change when the site owner updates their board.

The hash should change whenever the skin is updated. I had a look through the core caches, and we already have a cache entry for each skin in "skinsets" under "set_updated".

I would imagine its a very simple change, that requires no extra queries, to have the timestamp of when the skin was last updated added to the hash, then whenever someone edits their skin files, changes will be reflected straight away as the hash will change.