Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caching of unchanged developmental assets #938

Closed
Silic0nS0ldier opened this issue Feb 17, 2019 · 1 comment
Closed

Caching of unchanged developmental assets #938

Silic0nS0ldier opened this issue Feb 17, 2019 · 1 comment
Assignees
Labels
developer experience The one building with UF
Milestone

Comments

@Silic0nS0ldier
Copy link
Member

Silic0nS0ldier commented Feb 17, 2019

Currently while in dev mode (and I believe some others) we disable caching of assets to ensure that the newest data always arrives. This however can increase load times substantially during development, during which few files are changed at once.

What we can do here is enable caching and add ?YYYY.MM.DD-HH:mm or similiar to the end of the resource URL which is based on the files last modification date. This will be enough to serve as a cache buster, and is already widely used for cache busting purposes.

Given how the system is implemented in 4.2 it shouldn't be too difficult to implement with changes only needing to be made in UserFrosting\Assets, which houses the developmental asset server and tag generator. Once published, the feature would just "light up" once people run composer update.

In the past (and perhaps still) the barrage of asset requests caused session management to bug out somewhat, particularly around alerts. Implementing this would mitigate this problem, and any others that are caused by the same phenomenon. Race conditions are still something to bare in mind however.

@Silic0nS0ldier Silic0nS0ldier added up-for-grabs Not assigned yet developer experience The one building with UF labels Feb 17, 2019
@Silic0nS0ldier Silic0nS0ldier added this to the 4.2.x milestone Feb 17, 2019
@alexweissman alexweissman changed the title Caching of unchanged developemental assets Caching of unchanged developmental assets Feb 21, 2019
@Silic0nS0ldier Silic0nS0ldier self-assigned this Mar 17, 2019
@Silic0nS0ldier Silic0nS0ldier removed the up-for-grabs Not assigned yet label Mar 17, 2019
@lcharette lcharette reopened this Apr 15, 2019
@lcharette lcharette modified the milestones: 4.2.x, 4.3.x Aug 27, 2019
@lcharette
Copy link
Member

Closing, as it's not relevant anymore with UF5

@lcharette lcharette closed this as not planned Won't fix, can't repro, duplicate, stale Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer experience The one building with UF
Projects
None yet
Development

No branches or pull requests

2 participants