All Projects → ArtBlnd → endorphin

ArtBlnd / endorphin

Licence: MIT license
Key-Value based in-memory cache library which supports Custom Expiration Policies

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to endorphin

PHP-File-Cache
Light, simple and standalone PHP in-file caching class
Stars: ✭ 34 (+142.86%)
Mutual labels:  caching
kdk memcached object cache
Object cache driver for Memcached in WordPress (based on Memcached Redux)
Stars: ✭ 20 (+42.86%)
Mutual labels:  caching
trickster
Open Source HTTP Reverse Proxy Cache and Time Series Dashboard Accelerator
Stars: ✭ 1,753 (+12421.43%)
Mutual labels:  caching
infinispan-spring-boot
Infinispan Spring Boot starter. Use this starter in your Spring Boot applications to help you use Infinispan+Spring integration in embedded and client/server mode
Stars: ✭ 61 (+335.71%)
Mutual labels:  caching
libcache
A caching library that provides an in-memory and file based cache for Ruby
Stars: ✭ 25 (+78.57%)
Mutual labels:  caching
bkt
bkt is a subprocess caching utility, available as a command line binary and a Rust library.
Stars: ✭ 117 (+735.71%)
Mutual labels:  caching
LruClockCache
A low-latency LRU approximation cache in C++ using CLOCK second-chance algorithm. Multi level cache too. Up to 2.5 billion lookups per second.
Stars: ✭ 35 (+150%)
Mutual labels:  caching
stash
Key-value store abstraction with plain and cache driven semantics and a pluggable backend architecture.
Stars: ✭ 71 (+407.14%)
Mutual labels:  caching
webuntis
A API library that makes it easy to access the Webuntis JSON RPC 2.0 API
Stars: ✭ 22 (+57.14%)
Mutual labels:  caching
powered-cache
The most powerful caching and performance suite for WordPress.
Stars: ✭ 31 (+121.43%)
Mutual labels:  caching
sfsdb
Simple yet extensible database you already know how to use
Stars: ✭ 36 (+157.14%)
Mutual labels:  caching
hoardr
⚠️ ARCHIVED ⚠️ manage cached files
Stars: ✭ 19 (+35.71%)
Mutual labels:  caching
maki
[beta] persistent memoization of computations, e.g. for repeatable tests and benchmarks
Stars: ✭ 16 (+14.29%)
Mutual labels:  caching
loQL
loQL is a lightweight, open source npm package that caches API requests with service workers, unlocking performance gains and enabling offline use.
Stars: ✭ 49 (+250%)
Mutual labels:  caching
DailyBugle
📰Modern MVVM Android application following single activity architecture which fetches news from 🕷️ news API. this repository contains some best practices ⚡ of android development
Stars: ✭ 17 (+21.43%)
Mutual labels:  caching
performance-dashboard
Magento 2 Performance Dashboard
Stars: ✭ 60 (+328.57%)
Mutual labels:  caching
Foundatio.Samples
Foundatio Samples
Stars: ✭ 34 (+142.86%)
Mutual labels:  caching
cachegrand
cachegrand is an open-source fast, scalable and secure Key-Value store, also fully compatible with Redis protocol, designed from the ground up to take advantage of modern hardware vertical scalability, able to provide better performance and a larger cache at lower cost, without losing focus on distributed systems.
Stars: ✭ 87 (+521.43%)
Mutual labels:  caching
EFCache
Second Level Cache for Entity Framework 6.1
Stars: ✭ 97 (+592.86%)
Mutual labels:  caching
wagtail-cache
A simple page cache for Wagtail based on the Django cache middleware.
Stars: ✭ 63 (+350%)
Mutual labels:  caching

Endorphin

Key-Value based in-memory cache library which supports Custom Expiration Policies with standard HashMap, HashSet interface.

Example

use std::thread::sleep;
use std::time::Duration;

use endorphin::policy::TTLPolicy;
use endorphin::HashMap;

fn main() {
    let mut cache = HashMap::new(TTLPolicy::new());

    cache.insert("Still", "Alive", Duration::from_secs(3));
    cache.insert("Gonna", "Die", Duration::from_secs(1));

    sleep(Duration::from_secs(1));

    assert_eq!(cache.get(&"Still"), Some(&"Alive"));
    assert_eq!(cache.get(&"Gonna"), None);
}

Currently, we are providing four pre-defined policies.

  • LazyFixedTTLPolicy uses Lazy Expiration as other cache crates do, it expires items when you access entry after its TTL.
  • TTLPolicy uses Active Expiration which expires even you don't access to expired entries.
  • TTIPolicy uses Active Expiration which expires even you don't access to expired entries.
  • MixedPolicy is mixed policy of TTL and TTI
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].