Releases: aholstenson/transitory
Releases · aholstenson/transitory
2.2.0
2.1.0
- Cache implementations are now exported to allow for direct use. Skipping the use of the builder allows for tree-shaking in ES Module projects
2.0.1
Bugfix release to fix NPM deployment not including the built JavaScript files.
2.0.0
Transitory has been rewritten in TypeScript allowing for a safer cache implementation and easier use in other TypeScript projects.
API changes in 2.x:
Cache
can no longer be used withinstanceof
, it has been replaced withAbstractCache
get(key)
has been replaced withgetIfPresent(key)
for all non-loading cachesRemovalCause
has been renamed toRemovalReason
and now uses strings instead of symbols- Builders are now created via
newCache()
instead of directly via the imported object
Other changes:
- Separate CommonJS build for Node
- ES Module builds to support tree-shaking and easier importing in browser projects
1.2.1
- Fix:
memoryEstimator
now works correctly with timed and bounded caches
1.2.0
- Added support for
peek(key)
to allow peeking into the contents of a cache without loading or or affecting any metrics or stats of the cache
1.1.0
cleanUp()
is now part of the public API. It can be used toequest clean up of the cache by removing expired entries and old data. In most cases this is not needed. See README for details.- All caches now share a common base class to allow for checks using
instanceof
:if(obj instanceof transitory.Cache)
1.0.0
- Human friendly arguments in builder
clear()
andkeys()
added to Cache API
0.7.0
- Improved hit rates
- Expiration of entries now evaluated on set and delete
0.6.0
- Added support for metrics
- Improved hit rate for bounded cache