Least-Recently Used (LRU) Cache

버전 1.0.0 (3.36 KB) 작성자: Richard Lange
A map-like container of (key, value) pairs that automatically enforces a maximum size by deleting oldest keys when new ones are added.
다운로드 수: 145
업데이트 날짜: 2018/9/17

라이선스 보기

This package provides a Matlab implementation of a LRU cache. An LRU cache is a container of (key, value) pairs with some upper limit on size. Whenever a new element is added that would go over this limit, the least-recently-used item is discarded. This implementation allows for a limit either on the total number of items and/or on the total memory usage in bytes. This makes it a useful tool for caching results in memory while keeping the size of the cache under a pre-specified limit, for example.

The file `LRU.m` contains the class definition for the cache. `DLL.m` contains a simple doubly-linked list, which is needed inside of `LRU`. `testLRUCache.m` contains three simple test cases that also serve as examples.

인용 양식

Richard Lange (2024). Least-Recently Used (LRU) Cache (https://www.mathworks.com/matlabcentral/fileexchange/68836-least-recently-used-lru-cache), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2018b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Deployable Archive Creation에 대해 자세히 알아보기
태그 태그 추가

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0