0

I've come across an issue which appears to be to do with caching and the assets pipeline. The app is setup to run in development mode from myapp.local and various subdomains of this. These domains are just setup in my /etc/hosts file to point to 127.0.0.1.

The issue is that when assets are loaded via this domain they are very slow, as if they are not being cached:

$ time curl http://myapp.local/assets/application.css
....
curl http://myapp.local/assets/application.css  0.01s user 0.02s system 0% cpu 5.125 total

If I access them over localhost, they load almost instantly:

$ time curl http://localhost/assets/application.css
...
curl http://localhost/assets/application.css  0.01s user 0.02s system 30% cpu 0.121 total

Is there a way to make the caching behave correctly when accessing it other over the custom development domains?

Luca Spiller
  • 2,248
  • 4
  • 24
  • 28

1 Answers1

0

In the end I just changed everything to myapp.localhost.

Luca Spiller
  • 2,248
  • 4
  • 24
  • 28