Skip to content

An extension of spatie/valuestore with in-memory caching.

License

Notifications You must be signed in to change notification settings

timacdonald/cached-valuestore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cached Valuestore

Latest Stable Version Total Downloads License

This is an extension of spatie/valuestore that introduces a local cache in the class. Thanks to Spatie for providing such a great package ecosystem. This is an under appreciated awesome package IMO.

Installation

You can install using composer from Packagist

$ composer require timacdonald/cached-valuestore

Usage

Please refer to the original package docs for general usage. The only new method is the ability to clear the cache - however this is done when persisting so you probably won't ever need it.

$valuestore->clearCache();

Thanksware

You are free to use this package, but I ask that you reach out to someone (not me) who has previously, or is currently, maintaining or contributing to an open source library you are using in your project and thank them for their work. Consider your entire tech stack: packages, frameworks, languages, databases, operating systems, frontend, backend, etc.

Upgrade v1 > v2

  • The cache is now an instance variable rather than a static variable.
  • Any calls to Valuestore::clearCache(); need to be replaced with $valuestore->clearCache();.

About

An extension of spatie/valuestore with in-memory caching.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages