-
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
Question - Cache warmup #156
Comments
Thanks! That might be the solution. I'll have a look tomorrow for the thumbnail generation. If this is woking I can upload the original later on using a queue system and doing it in the background. |
No, |
ok thanks for the explanation ;) |
ok I've managed to do it but it looks quite fastidious. Here is my code: // Generate the thumbnail
$image = $this->imagine->open($file->getPathname());
$image = $this->imagineFilterManager->applyFilter($image, $this->filterName);
// Get a response object to store it in the cache
$request = new Request();
$response = $this->imagineFilterManager->get($request, $this->filterName, $image, $file->getPathname());
// Store the response in the cache
$this->imagineCacheManager->store($response, $remote, $this->filterName); I needed to create a dummy |
Ok, I found out why it was slow... it was because it was not prefixing the I had to prefix it manually: // Store the response in the cache
$this->imagineCacheManager->store($response, $this->filterName.'/'.$remote, $this->filterName); |
Still eating some of the page load (~1sec/image). <img src="{{ content.image | imagine_filter('content_thumb') }}" /> Is there anyway to speed up the resolver for S3? |
You can extend it with e.g. Memcached for result caching whether the object exist. |
Hi,
This is more a question than a bug (maybe a feature request).
Images in my application are uploaded to S3 (it take a while depending of the size).
Once the upload is finished, I display a preview of the content using Liip (twig filter) to resolve the image from the cache (S3 cache too).
The preview image take at least 20 seconds to be displayed because it has to download the original, apply the filter, save the thumbnail on S3 and finally display it.
I'm wondering if it's possible to generate this thumbnail in PHP directly like that I don't have the latence in the frontend at least?
Cheers,
Maxime
The text was updated successfully, but these errors were encountered: