lauripiispanen/grails-resources — comment on commit 69399d7ffa4633c952e442aa6127cdb3f82066a9
File:  line 0
By lauripiispanen:

That's true, but not all /static/ requests target ad-hoc resources, and there's no way of knowing whether or not an ad-hoc request hits any existing resource besides a lookup of that file, right? Problem in this case is that when memoizing the resource for given URL, the lookup doesn't check if the file exists on the disk, but instead just assumes that it doesn't. It relies on the fact that user would have arrived through the legacy URL to the ad-hoc resource for the first time...

But users may also arrive to an ad-hoc resource directly to the /static/-prefixed URL - e.g. if another server in the cluster creates the link and a load balancer round-robins it to a freshly attached instance.

I was wondering, would it maybe be possible to use a different prefix for ad hoc resources? This would reduce ambiguity between bundles and ad hoc resources.