1602 / 1602/compound

How are js files merged?

Offen
#621 5 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
1.6k
Forks
179
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

I'm making a small change to one js file. In development mode everything is fine. However, when I push it to the server, even if a file is changed, the merged files are still getting the same name.

So even after a file is changed there production server is still serving:

```

```

So people have to clear their cache to get the new update, which is hard to explain...

In `production.coffee` I have:

```
app.enable 'merge javascripts'
```

Is there a way to less aggressively cache? Or a way to make it change the file name on every push?

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Look at the production.coffee configuration and the asset pipeline logic that merges and caches JavaScript files. The issue is about cache busting; investigate how the merged file name (cache_123...123.js) is generated and whether it can include a hash of the content. Check the server-side code that serves these assets and the documentation on 'merge javascripts'.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript, node.js
Bereich
build-system, performance
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.