Skip to content

[LazyImage] Fix cache implementation #1761

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

Merged
merged 1 commit into from
Apr 20, 2024

Conversation

Kocal
Copy link
Member

@Kocal Kocal commented Apr 20, 2024

Q A
Bug fix? yes
New feature? no
Issues Fix #...
License MIT

Following #1755 (comment), BlurHash#createDataUriThumbnail could not use the cache because it call $this->encode(), which refers to BlurHash#encode and not CachedBlurHash#encode.

So I went back with my previous implementation by injecting (or not) a CacheAdapter implementation to BlurHash, and use it if necessary.

I've cheated a bit to adapt test, because I really want to ensure $cache is used or not.

@carsonbot carsonbot added the Status: Needs Review Needs to be reviewed label Apr 20, 2024
@carsonbot carsonbot added Status: Reviewed Has been reviewed by a maintainer and removed Status: Needs Review Needs to be reviewed labels Apr 20, 2024
@kbond
Copy link
Member

kbond commented Apr 20, 2024

Good catch, thanks Hugo.

@kbond kbond merged commit e208f7e into symfony:2.x Apr 20, 2024
35 of 37 checks passed
@Kocal Kocal deleted the fix/lazy-image-cache-implem branch April 20, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Reviewed Has been reviewed by a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants