You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

是否存在仍在活跃维护的NativeScript数据缓存插件?

Active NativeScript Data Cache Plugins (Alternatives to nativescript-cache)

Hey there! I totally get the letdown when a go-to plugin gets abandoned—been there myself. Here are some actively maintained options to fill that caching gap in your NativeScript project:

  • @triniwiz/nativescript-cache
    This is a maintained fork of the original nativescript-cache you mentioned, so the API is nearly identical (making migration super straightforward). It supports storing all common data types (strings, numbers, objects, arrays) and lets you set custom expiration times for cached items. It’s regularly updated to support the latest NativeScript versions (7+), so compatibility won’t be a headache down the line.

  • nativescript-sqlite
    If your caching needs are more complex—like storing structured data, running queries, or handling larger datasets—this actively maintained SQLite plugin is a solid pick. It gives you full control over your cached data with SQL operations, transactions, and persistent storage. Ideal for apps that need more than simple key-value pairs.

  • NativeScript Core’s ApplicationSettings
    While not a dedicated "cache" plugin, the built-in ApplicationSettings (part of @nativescript/core) is perfect for lightweight, persistent key-value storage. It’s 100% maintained by the NativeScript team, so it’s rock-solid for storing small bits of data like user preferences, auth tokens, or app state. No extra dependencies needed—just import it and use methods like setString(), getNumber(), etc.

Quick Usage Example (for @triniwiz/nativescript-cache)

import { Cache } from '@triniwiz/nativescript-cache';

// Store data with a 24-hour expiration
Cache.set('user-profile', { name: 'Jane', age: 30 }, 24 * 60 * 60 * 1000);

// Retrieve cached data
const userProfile = Cache.get('user-profile');

// Clear a specific item or the entire cache
Cache.remove('user-profile');
Cache.clear();

Hope these options help you find the right fit for your project!

内容的提问来源于stack exchange,提问作者Jannomeister

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 09:17:33