
Security News
RubyGems Adds Cooldown Feature to Bundler for Newly Published Gems
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.
@nostr-dev-kit/cache-sqlite
Advanced tools
SQLite cache adapter for NDK using better-sqlite3, compatible with Node.js environments.
SQLite cache adapter for NDK using better-sqlite3, compatible with Node.js environments.
npm install @nostr-dev-kit/cache-sqlite
# or
yarn add @nostr-dev-kit/cache-sqlite
# or
bun add @nostr-dev-kit/cache-sqlite
import NDK from '@nostr-dev-kit/ndk';
import { NDKCacheAdapterSqlite } from '@nostr-dev-kit/cache-sqlite';
const cache = new NDKCacheAdapterSqlite({
dbPath: './ndk-cache.db', // Optional: custom database path
dbName: 'ndk-cache' // Optional: database name (used if dbPath not provided)
});
const ndk = new NDK({
cacheAdapter: cache,
// ... other NDK options
});
// Initialize the cache adapter
await cache.initializeAsync(ndk);
await ndk.connect();
interface NDKCacheAdapterSqliteOptions {
dbPath?: string; // Custom path to SQLite database file
dbName?: string; // Database name (default: 'ndk-cache')
}
The adapter uses the same schema as cache-sqlite-wasm:
events - Stores Nostr eventsprofiles - Stores user profilesdecrypted_events - Stores decrypted eventsunpublished_events - Tracks unpublished eventsevent_tags - Indexes event tags for fast queriesrelay_status - Tracks relay connection statusnutzap_monitor_state - Stores nutzap monitoring stateThis package is designed to be a drop-in replacement for cache-sqlite-wasm in Node.js environments. The database schema is identical, allowing for easy migration between the two adapters.
# Install dependencies
bun install
# Run tests
bun test
# Build the package
bun run build
MIT
FAQs
SQLite cache adapter for NDK using better-sqlite3, compatible with Node.js environments.
The npm package @nostr-dev-kit/cache-sqlite receives a total of 2 weekly downloads. As such, @nostr-dev-kit/cache-sqlite popularity was classified as not popular.
We found that @nostr-dev-kit/cache-sqlite demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.