Caching middleware for JavaScript

Usage no npm install needed!

<script type="module">
  import waferdb from 'https://cdn.skypack.dev/waferdb';


waferDB.js -- Caching Middleware for JavaScript

A lightweight caching layer for a key-value store.


wafer.create('user_2389', 'shopping_cart_full', function(response){
  if(response.success) {
    // ...

wafer.read('user_2389', function(response){

wafer.update('user_2389', 'shopping_cart_empty', function(response){
  if(response.success) {
    // ...

wafer.delete('user_2389', function(response){
  if(response.success) {
    // ...


Latency - A graph showing response times with and without waferDB.

Efficiency - A graph comparing the overhead of maintaining fresh objects in the cache vs. dumping objects on dirty.

Scalability - Measure performance with N clients.


Will get to this later...

install (eventually)

npm install waferdb


Matt Kneiser

Vijairam Parasuraman

Balaji Soundararajan


  • will return the object associated with that key. To optimize for low latency, this object maybe cached on the client. Caching takes into account dirty objects, and replenishes them according to the consistency level the server is set to.

  • run a command to get statistics (cache hit rate, etc.)

  • resilient to server going down/reconnects save state (write to fs asynchly, don't affect server perf)

  • db adapter is modular and easy to extend

  • API should let you write if(data.success) { "success": "success" }


  • don't invalidate cache of sender on delete

  • ensure mongo integration

  • cloud mongo integration

  • pull/push changes

  • CRUD

    • deleting non-existant keys
    • alert on failure not success
    • update/insert empty key (don't allow)
  • clean up DB & README for npm

  • npm publish

  • graphs

  • performance eval

  • demo ready


  • performance graphs
  • view of the cache
  • buttons to send data