Skip to content

Add concept of connectors to cacheables#9

Closed
bwees wants to merge 2 commits intogrischaerbe:masterfrom
bwees:master
Closed

Add concept of connectors to cacheables#9
bwees wants to merge 2 commits intogrischaerbe:masterfrom
bwees:master

Conversation

@bwees
Copy link
Copy Markdown

@bwees bwees commented Aug 30, 2024

This PR allows a custom cache connector to replace the in-memory cache. This PR retains the default behavior of the library (in-memory cache) but allows you to specify a connector that implements CacheConnector. This will allow users to implement databases such as Redis or other KV stores as cache storage.

The in-memory cache has been broken into its own class that implements CacheConnector to simplify the code. This class is used by default if a connector is not specified.

bwees added 2 commits August 30, 2024 11:26
defaults to the original memory cache but the memory cache is broken into its own class
@grischaerbe
Copy link
Copy Markdown
Owner

Hi @bwees and sorry for getting back to you 2 years after you posted this. in fact, it's the first time im ever seeing this PR and apparently it's not a me problem. I always saw a stray PR in the "number of open PRs" badge next to the "Pull Requests" Tab, it always showed 1, but it wasn't available in the actual list of Pull Requests.
Just today, when GH posted this notice about an "ongoing search incident", your PR surfaced, or at least that's the first time I was able to actually view it. Nevertheless I'm very sorry it took literal ages. The good news: In the meantime i implemented something that is very close and goes beyond your approach and requirements. V3 will support a multi-layer architecture which makes implementing custom cache buckets a breeze, i hope you like it. I'll leave this open in case you want to iterate on you approach 👍 Thanks!

Bildschirmfoto 2026-04-29 um 12 04 22

@bwees
Copy link
Copy Markdown
Author

bwees commented Apr 29, 2026

No worries! The new implementation looks excellent.

Thanks!

@bwees bwees closed this Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants