shine-jayakumar / SimpleLRU

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SimpleLRU

A simple LRU caching class in Python

Usage:

from caching import LRUCache

lrucache = LRUCache()

data = {
    "name": "Bob",
    "emp_id": 101
}

lrucache.set('hello world', data=data)

print(f'Key exists?: {lrucache.exists("hello world")}')

print(lrucache.get('hello world'))

About

License:MIT License


Languages

Language:Python 100.0%