Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Key Value Storage

Key Value Storage Laravel Package

a4sex/key-value-storage

A simple key-value storage package for Laravel/PHP that lets you persist and retrieve arbitrary values through a clean, unified API. Useful for settings, caches, and lightweight configuration without the overhead of a full database model.

View on GitHub
Deep Wiki
Context7

A simple key-value storage based on PSR-6, Caching Interface.

Frequently asked questions about Key Value Storage
How do I install a4sex/key-value-storage in a Laravel app?
The package has no visible Packagist footprint, so you install it from its GitLab repository. Add a Composer repositories entry with type vcs pointing at https://gitlab.com/a4sex/php/library/key-value-storage and configure GitLab token authentication in CI and on every developer machine. Pin the dependency to a commit SHA rather than a branch or caret constraint unless the repository demonstrably follows SemVer with tags.
Is a4sex/key-value-storage compatible with Laravel 10 and Laravel 11?
It implements PSR-6, so the critical check is the psr/cache constraint. Modern Laravel releases require psr/cache ^2.0 or ^3.0, and those versions tightened method signatures, so a package pinned to ^1.0 will conflict and force a resolution hack. Confirm the supported psr/cache majors, the PHP version floor, and whether a CI matrix proves those combinations before adopting it.
Can I register this package as a cache driver in config/cache.php?
No. It implements PSR-6 CacheItemPoolInterface, not Illuminate\Contracts\Cache\Repository, and Laravel ships no built-in PSR-6 to Store adapter. Wiring it into config/cache.php would require a hand-written Store shim, which adds risk without adding capability. Use it only through direct dependency injection into the specific framework-agnostic module that needs it.
Does a4sex/key-value-storage ship file, Redis, or array backends?
This is decision-critical and unclear from the description. If the package only wraps an injected CacheItemPoolInterface, its value over symfony/cache, which is battle-tested and already a transitive Laravel dependency, approaches zero. Verify whether it provides real storage backends or is purely an abstraction layer before committing.
How is a4sex/key-value-storage different from Laravel's cache or symfony/cache?
Laravel already ships Illuminate\Cache\Psr6\CacheAdapter, which lets any existing Laravel store satisfy PSR-6, so for a standard Laravel application this package is a duplicate abstraction. Its only realistic fit is a framework-agnostic library or bounded module that must not depend on illuminate/cache. If it is merely a wrapper, symfony/cache offers the same contract with vastly more deployment evidence.
Is a4sex/key-value-storage safe under concurrent writes?
PSR-6 deliberately says nothing about atomicity, locking, concurrency, or stampede protection. A simple storage implementation can satisfy the interface and still be unsafe when multiple processes write the same key. Ask the maintainer whether any locking or atomicity behavior exists beyond the bare specification before using it for anything write-heavy.
Does the package support cache tags, key prefixes, or namespacing?
PSR-6 has no concept of tags, key prefixes, or namespaces, and Laravel teams often rely on those features. If the package adds no extensions of its own, you must implement prefixing and invalidation manually. That missing ergonomics is a real cost for settings or configuration storage compared with Laravel's native cache repository.
Can I run this PSR-6 pool alongside Laravel's cache in the same app?
You can, but you probably should not. Running both means two cache systems in one process with divergent TTL semantics, divergent serialization, and potential key-space collisions. The cleaner pattern is to bind CacheItemPoolInterface as a singleton scoped to the one module's service provider and keep it away from the rest of the application's caching.
Is a4sex/key-value-storage actively maintained and safe for production?
It is a single-maintainer package with zero stars, zero dependents, and no third-party usage evidence, so the API stability signal is weak. Because it lives off GitHub and Packagist, Dependabot, Renovate, composer audit, and most SCA scanners will not see it, making vulnerabilities invisible to your existing controls. That supply-chain blind spot is the largest risk and it is process-level rather than code-level.
How should I evaluate or test a4sex/key-value-storage before adopting it?
The integration surface is small because PSR-6 is roughly six methods, so a time-boxed spike costs hours rather than days. Bind an in-memory pool, exercise set, get, delete, and expiry, and check serialization of non-scalar values across releases. Also confirm the license, test coverage, and maintainer responsiveness to issues before pinning a commit.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo