No way to tell which implementation backs a cache store (a driver factory can replace a built-in name)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 38/100
Research direction
Start at laravel-rust-cache-0.2.0/src/cache.rs:228 and trace how Drivers::extend and CacheManager::create resolve stores. Compare exposing the resolved backend with declaring capabilities for custom drivers; the issue leaves that API choice open. Done when packages can reliably determine the resolved store's implementation or required semantics.
Written by the indexing model from the issue text.
Description
A driver factory registered with Drivers::extend takes precedence over the built-in store with the same driver name (CacheManager::create looks up self.drivers first). So a store configured as redis or database may be backed by a custom implementation, and a package has no API to tell which.
That matters for packages whose correctness depends on the store's semantics: an atomic add/increment, a forget that reports whether it removed a live value, and storage shared between processes (one-time tokens, rate limits, locks). Such a package can check the configured StoreConfig variant, but not what will actually serve it, so it has to require an extra "I trust this store" setting for every production store.
Suggestion
One of:
- a way to ask a resolved
Repository(orCacheManager) whether a store is a built-in implementation and which one (Repository::backend() -> Backend::{Memory, Redis, Database, Custom(name)}); - or a capabilities query (
supports_atomic_add,is_shared_between_processes) that custom drivers declare.
Seen on 0.2.0 (laravel-rust-cache-0.2.0/src/cache.rs:228); the same on 0.x.
- Dominant language
- Rust
- Stars
- 847
- Forks
- 174
- Avg merge
- 5h 40m
- Merged PRs (30d)
- 167
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from laravel/rust-framework
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
laravel/rust-framework#864 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 64/100
laravel/rust-framework#876 ·
Maintainers usually reply within 1 day
-
Case-sensitive contains, starts_with and ends_with that match % and _ literally on every databaseOpen
Difficulty 4/5 3-5 days Newbie friendliness 58/100
laravel/rust-framework#874 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
laravel/rust-framework#873 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 58/100
laravel/rust-framework#872 ·
Maintainers usually reply within 1 day
All issues in laravel/rust-framework
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
neuralmagic/crucible#579 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
eclipse-score/kyron#249 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
seanmonstar/reqwest#3157 ·
Maintainers usually reply within 2 days