{"action":"created","issue":{"url":"https://api.github.com/repos/systemjs/systemjs/issues/1004","labels_url":"https://api.github.com/repos/systemjs/systemjs/issues/1004/labels{/name}","comments_url":"https://api.github.com/repos/systemjs/systemjs/issues/1004/comments","events_url":"https://api.github.com/repos/systemjs/systemjs/issues/1004/events","html_url":"https://github.com/systemjs/systemjs/issues/1004","id":124911607,"number":1004,"title":"How to manage cache using SystemJS","user":{"login":"jigargandhi","id":380721,"avatar_url":"https://avatars.githubusercontent.com/u/380721?v=3","gravatar_id":"","url":"https://api.github.com/users/jigargandhi","html_url":"https://github.com/jigargandhi","followers_url":"https://api.github.com/users/jigargandhi/followers","following_url":"https://api.github.com/users/jigargandhi/following{/other_user}","gists_url":"https://api.github.com/users/jigargandhi/gists{/gist_id}","starred_url":"https://api.github.com/users/jigargandhi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jigargandhi/subscriptions","organizations_url":"https://api.github.com/users/jigargandhi/orgs","repos_url":"https://api.github.com/users/jigargandhi/repos","events_url":"https://api.github.com/users/jigargandhi/events{/privacy}","received_events_url":"https://api.github.com/users/jigargandhi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-01-05T07:26:07Z","updated_at":"2016-01-05T14:59:14Z","closed_at":null,"body":"Need a way to add prefix/suffix to or modify package names while loading the files to cache files in the browser.\r\n\r\nAlso no adequate documentation on how to do this exists."},"comment":{"url":"https://api.github.com/repos/systemjs/systemjs/issues/comments/169025179","html_url":"https://github.com/systemjs/systemjs/issues/1004#issuecomment-169025179","issue_url":"https://api.github.com/repos/systemjs/systemjs/issues/1004","id":169025179,"user":{"login":"guybedford","id":598730,"avatar_url":"https://avatars.githubusercontent.com/u/598730?v=3","gravatar_id":"","url":"https://api.github.com/users/guybedford","html_url":"https://github.com/guybedford","followers_url":"https://api.github.com/users/guybedford/followers","following_url":"https://api.github.com/users/guybedford/following{/other_user}","gists_url":"https://api.github.com/users/guybedford/gists{/gist_id}","starred_url":"https://api.github.com/users/guybedford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guybedford/subscriptions","organizations_url":"https://api.github.com/users/guybedford/orgs","repos_url":"https://api.github.com/users/guybedford/repos","events_url":"https://api.github.com/users/guybedford/events{/privacy}","received_events_url":"https://api.github.com/users/guybedford/received_events","type":"User","site_admin":false},"created_at":"2016-01-05T14:59:14Z","updated_at":"2016-01-05T14:59:14Z","body":"We didn't actually integrate any cache URL scheme features, as the idea was to simply use unique versioned URLs with far-future expires for these use cases.\r\n\r\nCache-urls can be provided with a custom locate hook though:\r\n\r\n```javascript\r\nvar systemLocate = System.locate;\r\nSystem.locate = function(load) {\r\n  return systemLocate.call(this, load)\r\n  .then(function(url) {\r\n    if (url.match(/blah/))\r\n     return url + 'cache-part';\r\n    return url;\r\n  });\r\n};\r\n```"}}