SSDB 支持 TTL 过期机制
从 SSDB 1.6.7 版本开始, 增加了 Key 过期功能, 可以支持 Key 到期自动删除, 这样, SSDB 就可以作为一个持久化的缓存服务来使用. 该功能和 Redis 的 ttl/expire 一样, 使用方法是: $ssdb-setx('key', 'value', 60); 这段代码表示, 设置 key=value, 同时到 60
从 SSDB 1.6.7 版本开始, 增加了 Key 过期功能, 可以支持 Key 到期自动删除, 这样, SSDB 就可以作为一个持久化的缓存服务来使用. 该功能和 Redis 的 ttl/expire 一样, 使用方法是:
$ssdb->setx('key', 'value', 60);
这段代码表示, 设置 key=value, 同时到 60 秒后, 自动删除 key. 需要注意的是, TTL 只支持 KV 数据结构, hash(map) 和 zset 不支持.
下载 SSDB NoSQL 数据库源码: https://github.com/ideawu/ssdb
Related posts:
- SSDB 1.6.6 稳定版发布, 支持 hclear/zclear
- 单实例支撑每天上亿个请求的SSDB
- SSDB 采用里程碑式版本发布机制
- SSDB 支持 Snappy 压缩了
你现在看的文章是: SSDB 支持 TTL 过期机制
Linode VPS - 美国虚拟主机 | IT牛人博客聚合网站

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

When using Windows Shello, a supported camera cannot be found. The common reasons are that the camera used does not support face recognition and the camera driver is not installed correctly. So let's take a look at how to set it up. Windowshello cannot find a supported camera tutorial: Reason 1: The camera driver is not installed correctly 1. Generally speaking, the Win10 system can automatically install drivers for most cameras, as follows, there will be a notification after plugging in the camera; 2. At this time, we open the device Check the manager to see if the camera driver is installed. If not, you need to do it manually. WIN+X, then select Device Manager; 3. In the Device Manager window, expand the camera option, and the camera driver model will be displayed.

The main method to activate the win7 ultimate system is through win7 activation code or win7 activation tool. Generally, the genuine win7 activation code requires money, so where can I find the free win7 ultimate key? Today I will share with you some of the latest available win7 ultimate keys for activating the system. 1. Win7 Ultimate Edition activation key: FJGCP-4DFJD-GJY49-VJBQ7-HYRR2VQ3PY-VRX6D-CBG4J-8C6R2-TCVBD2Y4WT-DHTBF-Q6MMK-KYK6X-VKM6G342DG-6YJR8-X92GV-V7DCV-P4K279CW99-

TTL and TTI in Java caching technology are inseparable from caching technology in any software system. As a common caching technology, Java cache can be divided into multiple types according to different caching strategies, such as memory-based, disk-based or cluster-based caching. Regardless of their type, caches often become more complex and more widely used. However, there are also some issues that need to be paid attention to when using caching technology, such as cache expiration time, namely TTL and TTI. TTL and T

Does PyCharm Community Edition support enough plugins? Need specific code examples As the Python language becomes more and more widely used in the field of software development, PyCharm, as a professional Python integrated development environment (IDE), is favored by developers. PyCharm is divided into two versions: professional version and community version. The community version is provided for free, but its plug-in support is limited compared to the professional version. So the question is, does PyCharm Community Edition support enough plug-ins? This article will use specific code examples to

Pros and cons of open source software: Understanding the pros and cons of open source projects requires specific code examples In today’s digital age, open source software is getting more and more attention and respect. As a software development model based on the spirit of cooperation and sharing, open source software is widely used in different fields. However, despite the many advantages of open source software, there are also some challenges and limitations. This article will delve into the pros and cons of open source software and demonstrate the pros and cons of open source projects through specific code examples. 1. Advantages of open source software 1.1 Openness and transparency Open source software

ASUS tufz790plus supports memory frequency. ASUS TUFZ790-PLUS motherboard is a high-performance motherboard that supports dual-channel DDR4 memory and supports up to 64GB of memory. Its memory frequency is very powerful, up to 4800MHz. Specific supported memory frequencies include 2133MHz, 2400MHz, 2666MHz, 2800MHz, 3000MHz, 3200MHz, 3600MHz, 3733MHz, 3866MHz, 4000MHz, 4133MHz, 4266MHz, 4400MHz, 4533MHz, 4600MHz, 4733MHz and 4800MHz. Whether it is daily use or high performance needs

Some users use the XP system and want to upgrade their graphics cards to gtx960, but are not sure whether gtx960 supports the xp system. In fact, gtx960 supports xp system. We only need to download the driver suitable for xp system from the official website, and then we can use gtx960. Let’s take a look at the specific steps below. Does gtx960 support XP system: GTX960 is compatible with XP system. Just download and install the driver and you're good to go. First, we need to open the NVIDIA official website and navigate to the home page. We then need to find a label or button above the page, it will probably be labeled "Drivers". Once we find this option we need to click on

How to use Flask-Babel to achieve multi-language support Introduction: With the continuous development of the Internet, multi-language support has become a necessary feature for most websites and applications. Flask-Babel is a convenient and easy-to-use Flask extension that provides multi-language support based on the Babel library. This article will introduce how to use Flask-Babel to achieve multi-language support, and attach code examples. 1. Install Flask-Babel. Before starting, we need to install Flask-Bab first.
