Redis底層類型之json命令使用
關(guān)于redisjson
The JSON capability of Redis Stack provides JavaScript Object Notation (JSON) support for Redis. 可以看到redis json是輸入RedisStack的一部分。
那么RedisStack又是什么呢?
Redis Stack is the best starting point for working with Redis. We've bundled together the best of the technology that we have to offer into an easy-to-use package. Redis Stack extends the core features of Redis OSS and provides a complete developer experience for debugging and more.
RedisStack 是使用 Redis 的最佳起點。我們已經(jīng)把我們必須提供的最好的技術(shù)捆綁在一起,形成一個易于使用的軟件包。Redis Stack 擴展了 Redis OSS 的核心特性,并為調(diào)試等提供了完整的開發(fā)人員體驗。
Redis Stack 將以下功能捆綁到 Redis 中:JSON、搜索和查詢、時間序列和概率性。
Redis Stack packaging
There are two distinct Redis Stack packages to choose from:
有兩種不同的 Redis Stack 包可供選擇:
Redis Stack Server: This package contains Redis OSS and module extensions only. It does not contain RedisInsight, the developer desktop application. This package is best for production deployment and is intended to be a drop-in replacement (for example, if you're already deploying Redis OSS as a cache). You can still download RedisInsight separately.
Redis Stack Server:該包僅包含 Redis OSS 和模塊擴展。它不包含 RedisInsight 開發(fā)人員桌面應(yīng)用程序。這個包最適合生產(chǎn)部署,并旨在作為替代品(例如,如果您已經(jīng)將 Redis OSS 部署為緩存)。您仍然可以單獨下載 RedisInsight。
Redis Stack: This package contains everything a developer needs in a single bundle. This includes Redis Stack Server (Redis OSS and module extensions) along with the RedisInsight desktop application (or part of the docker container). If you want to create an application locally and explore how it interacts with Redis, this is the package for you.
Redis Stack:這個包包含開發(fā)人員在一個單獨的捆綁包中所需的一切。這包括 Redis Stack Server(Redis OSS 和模塊擴展)以及 RedisInsight 桌面應(yīng)用程序(或 Docker 容器的一部分)。如果您想在本地創(chuàng)建一個應(yīng)用程序并探索它與 Redis 的交互方式,這個包適合您。
如何安裝redis-statck
version: "3.7" services: redis: image: redis/redis-stack-server:latest container_name: redisstack hostname: redisstack restart: always ports: - "16379:6379" volumes: # - ./conf/redis.conf:/usr/local/etc/redis/redis.conf - ./data:/data - ./logs:/logs command: redis-stack-server --requirepass aimore@123456 networks: - default networks: default: external: name: aimore
命令
- JSON.SET
JSON.SET key path value [NX | XX] JSON.SET doc $ '{"a":2}' JSON.SET doc $.a '3'
JSET.SET returns a simple string reply: OK if executed correctly or nil if the specified NX or XX conditions were not met.
- JSON.GET
JSON.GET key [INDENT indent] [NEWLINE newline] [SPACE space] [path [path ...]]
Return the value at path in JSON serialized form
- JSON.DEL
JSON.DEL key [path]
以上就是Redis底層類型之json命令使用的詳細內(nèi)容,更多關(guān)于Redis底層類型json的資料請關(guān)注腳本之家其它相關(guān)文章!
相關(guān)文章
Redis的數(shù)據(jù)過期清除策略實現(xiàn)
Redis實現(xiàn)了數(shù)據(jù)過期清除策略,本文將深入解析Redis的數(shù)據(jù)過期清除策略,包括過期鍵的刪除方式、清除策略的選擇以及相關(guān)配置參數(shù)的介紹,感興趣的可以了解一下2024-05-05Redisson之lock()和tryLock()的區(qū)別及說明
這篇文章主要介紹了Redisson之lock()和tryLock()的區(qū)別及說明,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教2023-12-12Redis 對比 Memcached 并在 CentOS 下進行安裝配置詳解
Redis 是一個開源、支持網(wǎng)絡(luò)、基于內(nèi)存、鍵值對的 Key-Value 數(shù)據(jù)庫,本篇文章主要介紹了Redis 對比 Memcached 并在 CentOS 下進行安裝配置詳解,有興趣的可以了解一下。2016-11-11