Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 10 years ago

Last modified 6 years ago

#3773 closed enhancement (wontfix)

Dynamic Cache Busting

Reported by: hnla Owned by:
Milestone: 1.6 Priority: normal
Severity: minor Version: 1.5.1
Component: Templates Keywords: has-patch close
Cc:

Description

I use a few techniques for working file cache headers or file query strings for versioning, looking at bp enqueue styles while working on new bp child theme I decided to add a variation of one for getlastmod()on files to replace the cache busting version variable.

I've added it to bp functions for the fun of it and attached as a patch.

It simply adds into the WP register function position for versioning string a function that passes the file name through to be parsed though php filemtime() function and date() returning a last moded string.

Added it to all stylesheets bar the child one as wasn't sure without testing what to pass through.

Attachments (1)

dynamic-file-versioning#3773.patch (2.4 KB) - added by hnla 10 years ago.
Add function to dynamically apply file get last mod date/time as ver string

Download all attachments as: .zip

Change History (7)

@hnla
10 years ago

Add function to dynamically apply file get last mod date/time as ver string

#1 @boonebgorges
10 years ago

  • Milestone changed from Awaiting Review to 1.6

Let's have a look at this for 1.6. It looks clever as a general technique.

#2 @DJPaul
10 years ago

Wouldn't touching every enqueued file like this be very slow?

#3 @boonebgorges
10 years ago

  • Keywords close added

Wouldn't touching every enqueued file like this be very slow?

Good point. This should be part of our deployment scripts (currently fictional!) rather than happening at runtime.

#4 @DJPaul
10 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

#5 @hnla
10 years ago

Fair point, shame though, I'll have to run a few load time tests.

#6 @DJPaul
6 years ago

  • Component changed from Appearance - Template Parts to Templates
Note: See TracTickets for help on using tickets.