Sign in to follow this  
Followers 0

Anti-cache hash should change on edit or re-cache.

5 posts in this topic

Posted

I opened a support ticket after I found that CSS changes weren't visible on my site, despite there being an anti-cache hash.

It seemed as though the hash was not changing even after re-caching the skin set, so I dug into the output class and found the following:



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.


$this->antiCacheHash = md5( IPB_VERSION . $this->settings['board_url'] . md5( $this->settings['sql_tbl_prefix'] . $this->settings['sql_pass'] ) );

Share this post


Link to post
Share on other sites

Posted (edited)

[quote name='alexp999' timestamp='1344169256' post='2293934']
I opened a support ticket after I found that CSS changes weren't visible on my site, despite there being an anti-cache hash.

It seemed as though the hash was not changing even after re-caching the skin set, so I dug into the output class and found the following:



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.


Did you get a fix for this? I've got the same issue.


$this->antiCacheHash = md5( IPB_VERSION . $this->settings['board_url'] . md5( $this->settings['sql_tbl_prefix'] . $this->settings['sql_pass'] ) );

Edited by AutoItScript

Share this post


Link to post
Share on other sites

Posted

The only fix until its included in a future release will either be a code modification or hook.

I was hoping me might get some input from IPS on it too, but I think I will have to look into writing my own hook for now.

Share this post


Link to post
Share on other sites

Posted

For anyone coming across this later on, I'm pleased to say my hook is not needed for IPB 3.4.x, as IPS have implemented this fix themselves :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Who's Browsing   0 members

    No registered users viewing this page.