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

Open
Silic0nS0ldier opened this issue Feb 17, 2019 · 0 comments

Comments

Projects
None yet
2 participants
@Silic0nS0ldier
Copy link
Member

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 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

@lcharette lcharette closed this Apr 15, 2019

@lcharette lcharette reopened this Apr 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.