Skip to content

tecnolgd/velocache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

119 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

velocache

MIT License g++ 13.3.0+ Interface: CLI Release: v0.1.0-beta Docs

A high-performance, $O(1)$ LRU Cache Server built in C++ with persistent storage capabilities.


velocache_demo

Key Features:

  • Constant Time Complexity: $O(1)$ for both get and put operations via Hash-Map and Doubly Linked List integration.
  • Smart Hydration: Tail-to-Head file serialization ensures cache priority is preserved across system restarts.
  • Automatic Eviction: Self-managing memory limit with Least Recently Used (LRU) policy.
  • Minimal Footprint: Zero external dependencies; optimized for embedded or sidecar use cases.

Performance data

Results achieved from internal benchmarking [for 10k operations involving putValue() module]

  • Throughput: ~24006 ops/sec
  • Time Complexity: $O(1)$

Documentation

Installation & Build

Ensure you have g++ installed( make recommended).

#clone the repo
git clone https://github.com/tecnolgd/velocache/
#navigate to the project directory
cd velocache

From the project directory, run the following commands:

Using make (recommended)

  • Build both the server and the benchmark tool
    make

or

    make all
  • Build and run individualy
    • The Server:
        make v_server
    • The Benchmark Tool:
        make v_bench
  • Clean object files:
make clean

Manual Build and Run

  1. The Server
  • Build:
g++ src/cache.cpp  src/storage.cpp apps/server.cpp utils/input_validation.cpp -I./include-03 -Wall -o build/v_server  
  • Run:
./build/v_server
  1. The Benchmark Tool
  • Build:
g++ src/cache.cpp tests/benchmark.cpp -I./include-03 -Wall -o build/v_bench
  • Run:
./build/v_bench

Author & Version

  • Author: tecnolgd
  • Version: v0.1.0-beta
  • License: MIT License