Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Experimental in-memory files cache with eviction policy support#328

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
joseluisq merged 19 commits intomasterfrommemory-cache-support
Sep 3, 2024

Conversation

joseluisq
Copy link
Collaborator

@joseluisqjoseluisq commentedMar 7, 2024
edited
Loading

Description

This PR adds support for in-memory cache functionality on-read to SWS via an advanced configuration entry.

The feature also supports expiration policies such asTime To Live (TTL) andTime To Idle (TTI).

Admission to a cache is controlled by theLeast Frequently Used (LFU) policy and the eviction from a cache is controlled by theLeast Recently Used (LRU) policy.

For details about the options supported, seethe cache library docs.

Configuration example:

[general][advanced][advanced.memory-cache]# Maximum capacity entries of the memory cache-store. Default 256capacity =256# Time to live in seconds of a cached file entry. Default 1httl =3600# Time to idle in seconds of a cached file entry. Default 5mintti =300# Maximum size in bytes for a file entry to be cached. Default 8MBmax-file-size =8192

Note that this feature requires Rust1.76.0 or newer.

Also, point out thatthis experimental feature could be subject to change in future releases.

Library usage

This work was added as part of the Cargoexperimental feature. See#482.

Related Issue

Motivation and Context

Resolves#242

How Has This Been Tested?

Screenshots (if appropriate):

@joseluisqjoseluisq added enhancementNew feature or request v2v2 release PoCThis is only a proof of concept labelsMar 7, 2024
@joseluisqjoseluisq self-assigned thisMar 7, 2024
@semanticdiff-comSemanticDiff.com
Copy link

semanticdiff-combot commentedMar 7, 2024
edited
Loading

Review changes withSemanticDiff.

Analyzed 13 of 20 files.

Overall, the semantic diff is10% smaller than the GitHub diff.

FilenameStatus
Cargo.lockUnsupported file format
Cargo.tomlUnsupported file format
✔️tests/compression_static.rsAnalyzed
✔️tests/dir_listing.rsAnalyzed
✔️tests/static_files.rsAnalyzed
tests/toml/config.tomlUnsupported file format
✔️src/cors.rsAnalyzed
✔️src/handler.rs33.33% smaller
✔️src/lib.rsAnalyzed
✔️src/response.rs7.44% smaller
✔️src/server.rs57.56% smaller
✔️src/static_files.rs24.7% smaller
✔️src/testing.rsAnalyzed
✔️src/settings/file.rsAnalyzed
✔️src/settings/mod.rs0.44% smaller
src/mem_cache/cache.rsUnsupported file format
✔️src/mem_cache/mod.rsAnalyzed
src/mem_cache/stream.rsUnsupported file format
docs/content/building-from-source.mdUnsupported file format
.github/workflows/devel.ymlUnsupported file format

@joseluisqjoseluisq mentioned this pull requestMar 12, 2024
@joseluisqjoseluisq changed the titleIn-memory files cache with eviction policy supportIn-memory files cache with eviction policy and TTL supportMar 15, 2024
@joseluisqjoseluisq removed the PoCThis is only a proof of concept labelApr 5, 2024
@joseluisqjoseluisq added the advanced-featureAdvanced feature only available via the configuration file labelApr 6, 2024
@joseluisqjoseluisq added the PoCThis is only a proof of concept labelMay 1, 2024
@joseluisqjoseluisqforce-pushed themaster branch 3 times, most recently from69668a6 to936b224CompareMay 19, 2024 00:10
@joseluisqjoseluisq changed the titleIn-memory files cache with eviction policy and TTL supportIn-memory files cache with eviction policy supportAug 23, 2024
@joseluisqjoseluisq added experimentalThis is an experimental feature and removed PoCThis is only a proof of concept labelsAug 23, 2024
@joseluisqjoseluisq marked this pull request as ready for reviewSeptember 3, 2024 21:40
@joseluisqjoseluisq changed the titleIn-memory files cache with eviction policy supportExperimental in-memory files cache with eviction policy supportSep 3, 2024
@joseluisqjoseluisq merged commit5bdfcd4 intomasterSep 3, 2024
35 checks passed
@joseluisqjoseluisq deleted the memory-cache-support branchSeptember 3, 2024 22:15
@joseluisqjoseluisq added this to thev2.33.0 milestoneSep 3, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees

@joseluisqjoseluisq

Labels
advanced-featureAdvanced feature only available via the configuration fileenhancementNew feature or requestexperimentalThis is an experimental featurev2v2 release
Projects
None yet
Milestone
v2.33.0
Development

Successfully merging this pull request may close these issues.

Add in memory cache to SWS
1 participant
@joseluisq

[8]ページ先頭

©2009-2025 Movatter.jp