Method and system for realizing rest interface of cloud cache in Nginx
First Claim
1. A method for realizing a Representational State Transfer (REST) interface of a cloud cache in an Engine x (Nginx), comprising:
- receiving, by a cache plugin, a Hyper Text Transport Protocol (HTTP) message transmitted from a client, and parsing, by the cache plugin, out key information and an operation type corresponding to the HTTP message according to a preset configuration file;
converting, by the cache plugin, the key information and the operation type into a parameter required by a cloud cache operation and a cloud cache operation type, and transmitting, by the cache plugin, the parameter to a cloud cache apparatus, so that the cloud cache apparatus performs the cloud cache operation according to the parameter and the cloud cache operation type; and
receiving, by the cache plugin, a cloud cache operation result returned by the cloud cache apparatus, processing the cloud cache operation result, and returning, by the cloud cache apparatus, the processed result to the client.
1 Assignment
0 Petitions
Accused Products
Abstract
The present invention provides a method for realizing a REST (Representational State Transfer) interface of a cloud cache in an Nginx. The method includes: receiving a Hyper Text Transport Protocol (HTTP) message transmitted from a client, and parsing out key information and an operation type corresponding to the HTTP message according to a preset configuration file; converting the key information and the operation type into a parameter required by a cloud cache operation and a cloud cache operation type, and transmitting the parameter to a cloud cache apparatus, so that the cloud cache apparatus performs the cloud cache operation according to the parameter and the cloud cache operation type; receiving a cloud cache operation result returned by the cloud cache apparatus, processing the cloud cache operation result, and returning the processed result to the client. The present invention also provides a corresponding system. The present invention enables a larger cache capacity and better saves CPU resources, thereby enabling a more powerful cache function of the Nginx.
-
Citations
10 Claims
-
1. A method for realizing a Representational State Transfer (REST) interface of a cloud cache in an Engine x (Nginx), comprising:
-
receiving, by a cache plugin, a Hyper Text Transport Protocol (HTTP) message transmitted from a client, and parsing, by the cache plugin, out key information and an operation type corresponding to the HTTP message according to a preset configuration file; converting, by the cache plugin, the key information and the operation type into a parameter required by a cloud cache operation and a cloud cache operation type, and transmitting, by the cache plugin, the parameter to a cloud cache apparatus, so that the cloud cache apparatus performs the cloud cache operation according to the parameter and the cloud cache operation type; and receiving, by the cache plugin, a cloud cache operation result returned by the cloud cache apparatus, processing the cloud cache operation result, and returning, by the cloud cache apparatus, the processed result to the client. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A system for realizing a Representational State Transfer (REST) interface of a cloud cache in an Engine x (Nginx) comprising a cache plugin and a cloud cache apparatus, wherein the cloud cache apparatus is configured to perform a cloud cache operation, and the cache plugin comprises a processor, a memory, and one or more program modules stored in the memory, the one or more program modules comprising:
-
a parsing module, stored in the memory, which, when executed, causes the processor to receive a Hyper Text Transport Protocol (HTTP) message transmitted from a client, and parse out key information and an operation type corresponding to the HTTP message according to a preset configuration file; a conversion module, stored in the memory, which, when executed, causes the processor to convert the key information and the operation type into a parameter required by a cloud cache operation and a cloud cache operation type, and transmit the parameter to the cloud cache apparatus, so that the cloud cache apparatus performs the cloud cache operation according to the parameter and the cloud cache operation type; and a return module, stored in the memory, which, when executed, causes the processor to receive a cloud cache operation result returned by the cloud cache apparatus, process the cloud cache operation result, and return the processed result to the client. - View Dependent Claims (7, 8, 9, 10)
-
Specification