node.js - 如何在 Node Express 中将表数据存储在缓存中?

标签 node.js forms caching express store

我想将数据从一种表单存储到高速缓存中,然后将其检索到另一个页表,一次又一次重复这个过程。

最佳答案

SQL lite是处理进程内数据的好方法。

它可以在内存或磁盘文件中维护数据库并对其执行普通查询。

const sqlite3 = require('sqlite3').verbose();
let db = new sqlite3.Database(':memory:');


let db = new sqlite3.Database(':memory:', (err) => {
  if (err) {
    return console.error(err.message);
  }
  console.log('Connected to the in-memory SQlite database.');
});

关于node.js - 如何在 Node Express 中将表数据存储在缓存中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30155202/

相关文章:

javascript - 如何在不重新加载页面的情况下更改 BrowserWindow 哈希 url

node.js - Cordova Hook : stop node until promise finished

mysql - Django 电子表格

javascript - 使用 jquery 和 reCAPTCHA 验证输入表单

asp.net - 在ASP.NET中强制缓存过期的最佳方法是什么?

laravel - 如何在 Laravel 中使用原子锁?

node.js - MongoDB 使用 $match 和 $cond

javascript - javascript中的c()函数是什么意思?

css - 什么是 CSS、JS 和图像的过期 header ?

node.js - 使用模块 'crypto' 对十六进制数据进行 NodeJS DES ECB 加密