Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Asset caching #230

Closed
pivotal-medici opened this Issue · 7 comments

5 participants

@pivotal-medici

It seems that sometimes chrome is overly aggressive with caching static resources like script files. It would be nice is jasmine added a unique per run identifier similar to what rails does in production.

e.g.

<script src="/assets/foo-somethingunique1234.js" type="text/javascript"></script>
@ragaskar
Owner

We did a file hash for cache-busting awhile ago but it ended up being pretty expensive. Are you on the latest 1.2.0? This has some newer header tags that should help. If that doesn't seem to be better, we can consider adding timestamped get params, but I'd like to avoid filename remapping if possible.

@pivotal-medici

Yeah we're on the latest 1.2.0. We're getting some really aggressive caching. It doesn't seem to be consistent. We have found that restarting the jasmine server clears the cached assets.

@infews
Owner

Is this still an issue? Have you tried jasmine-gem HEAD of master? Between the tags that @ragaskar mentions and some architecture changes in the gem, we're not seeing caching thse days.

@rupurt

We have been on 1.3.2 and still see it from time to time. I'll switch to master now and see if it makes any difference.

@slackersoft
Owner

This should be better in 2.0. Please take a look and let us know if this is still an issue

@slackersoft slackersoft closed this
@rupurt

Do you know which commits might help?

@ragaskar
Owner

If you're using asset pipeline we should now include the fingerprint/md5 hash for asset pipeline assets. If you're not, there's no change, although we did introduce some caching directives awhile ago. If there's a demonstrable problem I'd prefer to fix those caching directives vs. adding hashing to files if possible. At one point jasmine did the latter and it was fairly slow/complex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.