Displaying 1 to 20 from 24 results

memoize-one - A memoization library which only remembers the latest invocation

  •    Javascript

A memoization library that only caches the result of the most recent arguments. There are only two hard things in Computer Science: cache invalidation and naming things.

memoizee - Complete memoize/cache solution for JavaScript

  •    Javascript

Originally derived from es5-ext package. memoize name was already taken, therefore project is published as memoizee on NPM.

moize - The consistently-fast, complete memoization solution for JS

  •    Javascript

moize is a consistently blazing fast memoization library for JavaScript. It handles multiple parameters (including default values) without any additional configuration, and offers a large number of options to satisfy any number of potential use-cases. All parameter types are supported, including circular objects, functions, etc. There are also a number of shortcut methods to memoize for unique use-cases.




lru-memoize - A utility to provide LRU memoization for any js function

  •    Javascript

lru-memoize is a utility to provide simple memoization for any pure javascript function, using an LRU cache that prioritizes the most recently accessed values, and discards the "least recently used" (LRU) items when the size limit is reached. If your function has side effects or relies on some external state to generate its result, it should not be memoized. Let's look at an example where we want to memoize a function that multiplies three numbers together, and we want to keep the last ten arguments -> value mappings in memory.

reuse-promise - Reuse the same promise that's returned from a function until it's resolved

  •    Javascript

TL;DR - Prevent from a unique async process (function that returns a promise) to run more than once concurrently by temporarily caching the promise until it's resolved/rejected. When a function returns a promise and it's being called from multiple places in the app, new promises are being instantiated, and multiple async operations are going to be executed.

promise-memoize - Memoize promise-returning functions. Includes cache expire and prefetch.

  •    Javascript

Memoize promise-returning functions. Includes cache expire and prefetch.(*) IE9 and below will require setTimeout polyfill for correct work.

ceych - Wraps any asynchronous function and provides caching of the result

  •    Javascript

Ceych automatically creates cache keys based on the wrapped function's body and the arguments passed. This saves you from having to create a unique cache key every time you want the result of a function to be cached.Return values and arguments need to be serializable to/from JSON. This means that while strings, numbers and basic objects are supported, objects with custom constructors or prototypes are not.


lazy-value - Create a lazily evaluated value

  •    Javascript

Useful when a value is expensive to generate, so you want to delay the computation until the value is needed. For example, improving startup performance by deferring nonessential operations.Expected to return a value.

define-lazy-prop - Define a lazily evaluated property on an object

  •    Javascript

Useful when the value of a property is expensive to generate, so you want to delay the computation until the property is needed. For example, improving startup performance by deferring nonessential operations.Object to add property to.

memoize - memoize caches your callbacks given a set of arguments w/ persistence

  •    Javascript

memoize caches your callbacks given a set of arguments w/ persistence

disk-memoizer - Simple disk memoization for caching hight latency IO responses

  •    Javascript

Simple disk memoization and in memory LRU cache for speeding up frequently accessed high latency IO resources. Queues up concurrent requests for the same resource before it has been cached to avoid fetching it multiple times in parallel.

memoize.js - A faster JavaScript memoizer

  •    Javascript

Whilst not new by any means, memoization is a useful optimization technique for caching the results of function calls such that lengthy lookups or expensive recursive computations can be minimized where possible. The basic idea is that if you can detect an operation has already been previously completed for a specific set of input values, the stored result can instead be returned instead of repeating the operation again.

memoize - A method caching macro for elixir using CAS on ETS.

  •    Elixir

A memoization macro. The application available in hex.pm.

node-memoizeasync - Yet another memoizer for async functions and methods

  •    Javascript

Yet another memoizer for asynchronous functions. (Unfortunately setting Foo.prototype.myMethod = memoizeSync(...) wouldn't work as the memoizer would be shared among all instances of Foo).

memoizerific - Fast, small, efficient JavaScript memoization lib to memoize JS functions.

  •    Javascript

Fast (see benchmarks), small (1k min/gzip), efficient, JavaScript memoization lib to memoize JS functions. Uses JavaScript's Map() object for instant lookups, or a performant polyfill if Map is not available - does not do expensive serialization or string manipulation.

react-lazy-cache - A utility to lazily calculate and cache values in a react component based on props

  •    Javascript

react-lazy-cache is a utility to lazily calculate and cache values in a React component based on props. Ideally, in a React component, you would calculate values that depend on your props inputs every time the component is rendered. However, in practice, sometimes these values, either for computational or memory reasons, are better off cached. When you cache them, however, you need to be constantly watching your props to know if you need to invalidate your cache and recalculate those values. That is what react-lazy-cache does for you.

cachier - Persistent, stale-free, local and cross-machine caching for Python functions.

  •    Python

Persistent, stale-free, local and cross-machine caching for Python functions. Cachier provides a decorator which you can wrap arount your functions to give them a persistent cache. The positional and keyword arguments to the wrapped function must be hashable (i.e. Python's immutable built-in objects, not mutable containers). Also, notice that since objects which are instances of user-defined classes are hashable but all compare unequal (their hash value is their id), equal objects across different sessions will not yield identical keys.

lru-memoizer - Memoize functions results using an lru-cache.

  •    Javascript

Memoize functions results using an lru-cache. This module uses an lru-cache internally to cache the results of an async function.