-
Notifications
You must be signed in to change notification settings - Fork 379
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
Cache warmers #1258
base: 2.x
Are you sure you want to change the base?
Cache warmers #1258
Conversation
# Conflicts: # DependencyInjection/Configuration.php # Imagine/Cache/CacheManager.php # LiipImagineBundle.php # Resources/config/imagine.xml
hi @keshancs , i am going through the backlog of older issues and merge requests. thanks for the pull request. code looks good to me, but can you explain what the use case is? i would expect that usually, people keep the cached images between deployments. are you deploying image asset files that you convert with LiipImagineBundle to different sizes? as this is a significant amount of code, i wonder if it would be better to make a separate bundle out of this. i would be happy to mention it in the documentation for people that have the same use case. |
This is a feature, used by the company I work for.
Hopefully, this feature ends up in the master branch.
Steps to create a cache warmer:
WarmerInterface
and warms up the images (descriptions for methods can be found in the interface);liip_imagine.cache.warmer
. Tag also requires awarmer
parameter, which contains the name of the cache warmer. It can be used in the console command (read the next point);liip:imagine:cache:warm
finds all cache warmers and runs them, but you can also specify specific cache warmers separated by space:liip:imagine:cache:warm products_warmer brands_warmer
. Runliip:imagine:cache:warm --help
to read more.Service example:
Filter example:
If the description is missing information, it is misleading or hard to understand, let me know, so I can update it.