# Memoization constraints

> AI-ranked search results for `memoization constraints` on awesome-repositories.com — ordered by an LLM for relevance, best match first. 110 total matches; showing the top 21.

Explore on the web: https://awesome-repositories.com/q/memoization-constraints

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [this search on awesome-repositories.com](https://awesome-repositories.com/q/memoization-constraints).**

## Results

- [hashicorp/golang-lru](https://awesome-repositories.com/repository/hashicorp-golang-lru.md) (5,091 ⭐) — This is a thread-safe in-memory cache library for Go that automatically evicts the least recently used items when capacity is reached. It provides a fixed-size memory cache designed to maintain a constant memory footprint by removing the oldest entries as new data arrives.

The system includes an eviction manager that executes custom callbacks when entries are purged to facilitate resource cleanup. It also supports time-based expiration, allowing for the automatic removal of items after a specified time-to-live duration.

The library covers general caching capabilities including cache inspecti
- [coocood/freecache](https://awesome-repositories.com/repository/coocood-freecache.md) (5,399 ⭐) — freecache is a high-performance, concurrent in-memory key-value store library for Go applications. It functions as a fixed-size cache that manages large volumes of data while eliminating garbage collection overhead through the use of preallocated memory and off-heap storage.

The system maintains a predictable memory footprint by utilizing fixed memory allocation and circular buffer management, where new entries automatically overwrite the oldest data upon reaching capacity. It further reduces contention between simultaneous readers and writers through lock-striped concurrent access.

The libr
- [isaacs/node-lru-cache](https://awesome-repositories.com/repository/isaacs-node-lru-cache.md) (5,895 ⭐) — node-lru-cache is a key-value store for Node.js that implements a memory-limited cache. It prevents memory exhaustion by capping the total number of items or total byte size, automatically evicting the least-recently-used items to maintain these limits.

The project provides specialized caching patterns, including time-to-live durations to ensure data freshness and a stale-while-revalidate mechanism that serves expired content while asynchronously fetching updates in the background. It also includes diagnostic tools for monitoring cache hits, misses, and eviction metrics through operational st
- [dgraph-io/ristretto](https://awesome-repositories.com/repository/dgraph-io-ristretto.md) (6,932 ⭐) — Ristretto is a high-performance in-memory cache and concurrent key-value store for Go applications. It provides a thread-safe memory store that manages strict memory bounds and employs probabilistic set filters to reduce lookup overhead.

The system is distinguished by an admission-policy cache that utilizes frequency sketches and cost-based eviction to maximize hit ratios. It minimizes contention and improves throughput through the use of striped ring buffers and concurrent map sharding.

The project covers a broad range of data management capabilities, including time-based expiration, item f
- [pmylund/go-cache](https://awesome-repositories.com/repository/pmylund-go-cache.md) (8,828 ⭐) — go-cache is a thread-safe, in-memory key-value store for single-machine applications. It provides a local caching mechanism that stores objects in RAM to reduce redundant data retrieval and avoid the overhead of network protocols or serialization.

The system features a persistent cache store that saves the in-memory state to a local file, allowing data recovery across application restarts. 

The project manages concurrent data access across multiple routines and implements time-to-live expiration for cached entries. A background process periodically scans the store to delete expired items and
- [patrickmn/go-cache](https://awesome-repositories.com/repository/patrickmn-go-cache.md) (8,828 ⭐) — go-cache is a thread-safe, in-memory cache library for Go that stores arbitrary objects with per-item expiration timestamps. It provides a concurrent key-value store where multiple goroutines can safely read and write shared cached data without external synchronization, using a mutex-guarded map for access control.

The library distinguishes itself through its expiration management and optional disk persistence. Each cached item carries its own time-to-live, and a background goroutine periodically purges expired entries. The cache can serialize its entire contents to disk using Go's gob encodi
- [ben-manes/caffeine](https://awesome-repositories.com/repository/ben-manes-caffeine.md) (17,706 ⭐) — Caffeine is a high-performance caching library for the Java virtual machine designed to manage object lifecycles within the application heap. It functions as a thread-safe, memory-resident data store that reduces latency by keeping frequently accessed objects available for immediate retrieval.

The library distinguishes itself through a sophisticated eviction strategy that balances recency and frequency to determine which entries to retain. It utilizes a frequency-based admission policy to evaluate the historical access patterns of new data, ensuring that the cache remains populated with the m
- [google/guava](https://awesome-repositories.com/repository/google-guava.md) (51,473 ⭐) — Guava is a Java standard library extension and utility toolkit that provides optimized data structures, concurrency tools, and core extensions. It serves as a comprehensive set of helpers for Java development, focusing on reducing repetitive boilerplate logic.

The project is distinguished by its specialized implementations of immutable collections, which ensure thread safety and data consistency by preventing accidental modification. It also includes a dedicated graph data structure library for modeling and traversing networks of interconnected nodes and edges, alongside advanced collection t
- [grantjenks/python-diskcache](https://awesome-repositories.com/repository/grantjenks-python-diskcache.md) (2,828 ⭐) — This project is a disk-backed key-value store and persistent data structure library for Python. It provides a mechanism for persisting mappings, sets, and queues to the local filesystem to bypass memory limitations and cache expensive function results across threads and processes.

The system serves as a cross-process synchronization tool, offering distributed locks, semaphores, and barriers to coordinate shared resource access. It implements advanced caching strategies such as probabilistic stampede prevention, sharded data partitioning to increase throughput, and least-recently-used eviction
- [reactjs/reselect](https://awesome-repositories.com/repository/reactjs-reselect.md) (19,033 ⭐) — Reselect is a memoized selector framework and state selector library designed to optimize performance in Redux applications. It provides a system for computing derived data from a state store and caching the results to prevent unnecessary user interface re-renders.

The library functions as a state transformation pipeline, allowing multiple selectors to be composed into chains. This enables the creation of complex data transformation pipelines where the output of one memoized selector serves as the input for another.

The framework focuses on input-based memoization and referential equality ch
- [xiaolyuh/layering-cache](https://awesome-repositories.com/repository/xiaolyuh-layering-cache.md) (984 ⭐) — Layering-cache is a Java caching framework that combines local memory storage with centralized distributed remote storage to handle high-concurrency read requests. It uses method interception via annotations to automatically check stored data and execute underlying logic only when a cache miss occurs. 

The framework maintains data consistency across multiple server instances through publish-subscribe messaging, offset-based queues, and hybrid push-pull synchronization. It prevents sudden traffic spikes and heavy concurrent loads by triggering background threads to automatically refresh expiri
- [alexreardon/memoize-one](https://awesome-repositories.com/repository/alexreardon-memoize-one.md) (2,971 ⭐) — Memoize-one is a JavaScript function memoization library that stores function return values and serves them instantly on repeat calls with identical arguments to avoid redundant calculations. It retains only the single most recent argument set and return value, maintaining a constant and bounded memory footprint. 

The library features a shallow argument comparison engine and includes the runtime execution context alongside input arguments during comparison to ensure state and binding changes trigger fresh computations. Users can inject custom equality functions to override the default argumen
- [caiogondim/fast-memoize.js](https://awesome-repositories.com/repository/caiogondim-fast-memoize-js.md) (2,595 ⭐) — Fast-memoize.js is a JavaScript memoization library that caches function return values for identical arguments to speed up expensive execution in JavaScript applications. It operates as a caching utility that stores and retrieves function outputs by serializing input parameters into unique keys.

The library optimizes execution through arity-based function specialisation, generating tailored internal call paths based on the expected number of arguments. It features deterministic argument serialization to convert complex and variadic input parameters into unique string keys for reliable cache l
- [reduxjs/reselect](https://awesome-repositories.com/repository/reduxjs-reselect.md) (19,032 ⭐) — Reselect is a state management optimization tool and memoization utility designed to minimize redundant calculations and UI re-renders. It functions as a library for creating memoized selectors that derive specific data from a state store.

The library implements input-based memoization and recursive selector composition to create a hierarchy of derived data dependencies. It ensures reference-stable result caching and provides custom equality checking to determine when a cache should be invalidated.

The project covers capabilities for derived data computation, frontend performance optimizatio
- [melpon/memoize](https://awesome-repositories.com/repository/melpon-memoize.md) (204 ⭐) — A method caching macro for elixir using CAS on ETS.
- [sindresorhus/p-memoize](https://awesome-repositories.com/repository/sindresorhus-p-memoize.md) (442 ⭐) — Memoize promise-returning & async functions
- [nodeca/promise-memoize](https://awesome-repositories.com/repository/nodeca-promise-memoize.md) (62 ⭐) — Memoize promise-returning functions. Includes cache expire and prefetch.
- [tkem/cachetools](https://awesome-repositories.com/repository/tkem-cachetools.md) (2,750 ⭐) — Extensible memoizing collections and decorators
- [tornikegomareli/memoizemacro](https://awesome-repositories.com/repository/tornikegomareli-memoizemacro.md) (15 ⭐) — A Swift macro for easy function memoization.
- [jaemk/cached](https://awesome-repositories.com/repository/jaemk-cached.md) (2,040 ⭐) — Rust cache structures and easy function memoization
- [sindresorhus/mem](https://awesome-repositories.com/repository/sindresorhus-mem.md) (1,157 ⭐) — Memoize functions - an optimization technique used to speed up consecutive function calls by caching the result of calls with identical input
