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

Allow runtime physical deletion of cached images #240

Merged
merged 2 commits into from
Mar 22, 2022

Conversation

JimBobSquarePants
Copy link
Member

@JimBobSquarePants JimBobSquarePants commented Mar 22, 2022

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following matches the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

Allows the runtime deletion of cached images by handling any exceptions thrown during resolving the cached image. Fix #239

If an exception is thrown we do a complete run through of the processing again to ensure that any changes to both the source and image are captured. If an issue still occurs we'll log and rethrow.

CC @ronaldbarendse

@JimBobSquarePants JimBobSquarePants added this to the v2.0.0 milestone Mar 22, 2022
@JimBobSquarePants JimBobSquarePants requested a review from a team March 22, 2022 13:22
Copy link
Contributor

@ronaldbarendse ronaldbarendse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

src/ImageSharp.Web/Middleware/ImageSharpMiddleware.cs Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Mar 22, 2022

Codecov Report

Merging #240 (8bfe51f) into main (21a6bc1) will decrease coverage by 0%.
The diff coverage is 56%.

@@         Coverage Diff         @@
##           main   #240   +/-   ##
===================================
- Coverage    85%    85%   -1%     
===================================
  Files        71     71           
  Lines      1961   1969    +8     
  Branches    290    291    +1     
===================================
+ Hits       1682   1684    +2     
- Misses      201    207    +6     
  Partials     78     78           
Flag Coverage Δ
unittests 85% <56%> (-1%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/ImageSharp.Web/Middleware/ImageContext.cs 80% <ø> (ø)
.../ImageSharp.Web/Middleware/ImageSharpMiddleware.cs 77% <56%> (-3%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 21a6bc1...8bfe51f. Read the comment docs.

@JimBobSquarePants JimBobSquarePants merged commit f91c093 into main Mar 22, 2022
@JimBobSquarePants JimBobSquarePants deleted the js/lru-cache-fixes branch March 22, 2022 14:41
@ronaldbarendse ronaldbarendse mentioned this pull request Apr 25, 2022
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix exception when cached file is deleted, but still in the LRU cache
2 participants