redis

  • 网络数据库;存储;队列;目录
redisredis
  1. Now it is time to use Redis in our application code .

    现在是时候在应用程序代码中使用Redis了。

  2. Run the following command to get a Redis instance .

    运行以下命令来获得一个Redis实例。

  3. We just need to know some additional details about the Redis Cloud service .

    我们只需知道其他一些有关RedisCloud服务的细节。

  4. We need to add the Redis library to our dependencies .

    我们需要将Redis库添加到我们的依赖关系中。

  5. We need to require the Redis library so we can use it in our server code .

    我们需要对Redis库执行require,所以我们可在服务器代码中使用它。

  6. If that command completed successfully , you have an instance of Redis ready to use .

    如果该命令成功完成,您就会有一个Redis实例可供使用。

  7. A simpler solution is Redis , which supports basic publish / subscribe .

    Redis是一个更简单的解决方案,它支持基本发布/订阅功能。

  8. In addition , we have a services property with the name of our instance of the Redis service .

    此外,我们还有一个services属性,其内容为我们的Redis服务的实例的名称。

  9. Details such as these are provided to us by the Redis instance we created in the previous section .

    这些细节是我们在上一节中创建的Redis实例提供给我们的。

  10. The Redis is a persistent and distributed server-side-caching-system which supports the multiple data structures .

    Redis是一个支持多种数据结构的、持久化的、分布式的服务器端缓存系统。

  11. Redis is an extremely fast key-value store .

    Redis是一个非常快的键-值存储。

  12. To run the application locally , you can download and install a local Redis server from the Redis website .

    要在本地运行应用程序,可从Redis网站下载并安装一个本地Redis服务器。

  13. If it is undefined , we assume the user has a Redis server running locally at the default port ( 6379 ) .

    如果它未定义,我们假设用户有一个通过默认端口(6379)z在本地运行的Redis服务器。

  14. When a specific cache invalidation is required they use Redis messaging to publish removal notices to the " L1 " caches .

    当需要让一个特定的缓存失效,会通过Redis消息系统给一级缓存发送删除通知。

  15. Within the object returned to us is a credentials property , which contains the host , port , and password we need to connect to the Redis service .

    返回给我们的对象中是一个credentials属性,它包含我们连接到Redis服务所需的主机、端口和密码。

  16. In addition , there is a Redis library for Node . js , which we can use to communicate with our Redis Cloud service .

    此外,还有一个针对Node.js的Redis库,我们可使用它与我们的RedisCloud服务通信。

  17. Before we continue , we need details like the host , port , and password in order to connect to the Redis server given to us by Redis Cloud .

    继续之前,我们需要一些细节,比如主机、端口和密码,才能连接到RedisCloud为我们提供的Redis服务器。

  18. You can see the create-service command takes three parameters : the service name , the plan , and a name for the specific instance of the Redis Cloud service you choose .

    可以看到create-service命令接受3个参数:服务名称、计划和您选择的RedisCloud服务的特定实例的名称。

  19. In our new implementation , we are no longer looping through the clients array and sending the chat message ( this is now being done in the Redis subscriber event handler ) .

    在我们的新实现中,我们不再对客户端数组执行循环并发送聊天消息(此工作现在在Redis订阅者事件处理函数中三成。)

  20. APC and Wincache aren 't the only choices for a user cache ; memcache and Redis are other popular choices that don 't require you to run the user cache on the same server as the Web server .

    memcache和Redis是不需要您在与Web服务器相同的服务器上运行用户缓存的其他流行选择。