Opened 6 years ago

Closed 6 years ago

#17643 closed enhancement (fixed)

[CLA] [PATCH] Allow developers to construct their own "cachebusted" url

Reported by: iDo Owned by: bpayton
Priority: low Milestone: 1.10
Component: Loader Version: 1.9.2
Keywords: Cc:
Blocked By: Blocking:

Description

Hi all, The idea is to provide a way to construct the cachebusted URL. For instance, in our project we have multiple components, but all based on the same dojo instance. We need to have a different version number appended to URL according to the component currently running. This way, we can release one component without have to clear the cache of all other components.

With the attached patch, we can define a custom fixupUrl function in dojoConfig.

Attachments (1)

fixupUrl.patch (400 bytes) - added by iDo 6 years ago.
patch for dojo.js

Download all attachments as: .zip

Change History (7)

Changed 6 years ago by iDo

Attachment: fixupUrl.patch added

patch for dojo.js

comment:1 Changed 6 years ago by dylan

Patch looks fine. Adding a test would be nice.

Can you create a pull request for this? https://github.com/dojo/dojo/blob/master/CONTRIBUTING.md#submitting-a-pull-request

comment:2 in reply to:  1 Changed 6 years ago by iDo

Replying to dylan:

Patch looks fine. Adding a test would be nice.

Can you create a pull request for this? https://github.com/dojo/dojo/blob/master/CONTRIBUTING.md#submitting-a-pull-request

Hi, I tried to create a test but userConfig seems to not point to dojo.config. Therefore it's kind of static. The only way I found was to change the config used by doh, but it's not really satisfying. Any idea?

Note: Pull request is sent

Ben

comment:4 Changed 6 years ago by dylan

Milestone: tbd1.10
Owner: set to bpayton
Priority: undecidedlow
Status: newassigned

comment:5 Changed 6 years ago by Terence Kent

Looking forward to 1.10, this enhancement is very important for our deployments.

comment:6 Changed 6 years ago by Brandon Payton <brandon@…>

Resolution: fixed
Status: assignedclosed

In 677d3cf13fab8825aff532783fe86073674134ab/dojo:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 
Note: See TracTickets for help on using tickets.