Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: CI

on:
push:
branches: [master]
pull_request:

jobs:
test:
name: Test (Node ${{ matrix.node }} on ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
node: [20, 22, 24]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: npm

- name: Install dependencies
run: npm ci

- name: Run lint
run: npm run lint

- name: Run tests
run: npm test

valgrind:
name: Valgrind (Node 24 on ubuntu-latest)
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: npm

- name: Install valgrind
run: sudo apt-get update && sudo apt-get install -y valgrind

- name: Install dependencies
run: npm ci

- name: Run valgrind suite
run: npm run valgrind
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
lru-native2
===========
[![Build Status](https://travis-ci.org/d3m3vilurr/node-lru-native.svg?branch=master)](https://travis-ci.org/d3m3vilurr/node-lru-native)
[![CI](https://github.com/adzerk/node-lru-native/actions/workflows/ci.yml/badge.svg)](https://github.com/adzerk/node-lru-native/actions/workflows/ci.yml)

This is an implementation of a simple in-memory cache for node.js, supporting LRU (least-recently-used) eviction
and TTL expirations.

## Runtime compatibility

- Target runtime: Node.js 24.x
- Build prerequisites: Python 3 and a C++ compiler toolchain (`g++`/`clang++`) for `node-gyp`

It was developed as an alternative to the (excellent) [node-lru-cache](https://github.com/isaacs/node-lru-cache)
library for use with hashes with a very large number of items. V8 normally does a good job of optimizing the
in-memory representation of objects, but it isn't optimized for an object that holds a huge amount of data.
Expand Down
Loading