Redis interface cache control method and system of sports industry system
By using the Redis interface cache control method in the sports industry system, we can judge the interface cache opening status, update the cache data and customize the life extension key time, the system performance degradation caused by cache failure is solved, and fast query and efficient cache management are achieved.
Patent Information
- Application Number
- CN202510548156.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-08-01
AI Technical Summary
The interface calls of existing sports industry systems have problems such as slow response and poor stability. Caching technology has insufficient caching technology to handle cache failure and life-extending, resulting in system performance degradation.
Provide a Redis interface cache control method for sports industry systems. It determines whether the interface cache is enabled through the gateway, and obtains the cache value from the Redis cache server. If there is no cache value, call the interface server to obtain data and write it to the Redis cache server and file. Set the value of the life extension key based on the business scenario, and update the cache data through timed tasks to customize the time of the life extension key of the cache server.
It improves query speed and query effect, adapts to the needs of different business scenarios, ensures the timeliness of cached data, and improves the system's response speed and overall performance.
Smart Images

Figure CN120407657A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data caching, and particularly to a Redis interface caching control method and system for a sports industry system. Background Art
[0002] With the development of Internet technology, the frequency of interface calls in the sports industry system is increasing. Traditional interface call methods often have problems such as slow response and poor stability. To solve these problems, caching technology is usually adopted in the prior art to improve the efficiency of interface calls. However, existing caching technologies have deficiencies in handling cache invalidation, cache renewal, etc., resulting in a decline in system performance.
[0003] Therefore, there are still deficiencies in the prior art. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a Redis interface caching control method and system for a sports industry system in view of the above-mentioned deficiencies of the prior art. The technical solutions adopted by the present invention are as follows:
[0005] In a first aspect, the present invention provides a Redis interface caching control method for a sports industry system, wherein the method includes:
[0006] After the gateway receives the request information, it determines whether to enable interface caching, and after the interface caching is enabled, it obtains the cache value corresponding to the request information from the Redis cache server;
[0007] If the cache value exists in the Redis cache server, the corresponding cache content is read from the file and the cache content is fed back to the front end;
[0008] If the cache value does not exist in the Redis cache server, the interface server is called to obtain the corresponding data, and the data is written into the Redis cache server and the file, and the value of the renewal key of the Redis cache server is set based on the business scenario.
[0009] In one implementation, the method further includes:
[0010] The front end encrypts the parameters and cache identifier through MD5 and generates request information for transmission to the gateway.
[0011] In one implementation, setting the value of the renewal key of the Redis cache server based on the business scenario includes:
[0012] Based on the business scenario, the value of the renewal key in the Redis cache server is set to the time after adding a custom number of days to the current time.
[0013] In one implementation, the method further includes:
[0014] Traverse all Redis cache server value keys every preset time period and determine the expiration time of each Redis cache server value key;
[0015] If the expiration time is less than the preset value, call the interface server to obtain the latest data;
[0016] Write the latest data to the Redis cache server and file, and update the value of the Redis cache server's renewal key.
[0017] In one implementation, if the expiration time is less than a preset value, calling the interface server to obtain the latest data includes:
[0018] If the expiration time is less than the preset value, obtain the renewal time of the renewal key of the corresponding Redis cache server;
[0019] If the renewal time is greater than the current time, the parameters are obtained according to the Redis cache server parameter key;
[0020] Call the interface server based on the obtained parameters and send a request to the interface server to obtain the latest data.
[0021] In one implementation, writing the latest data to the Redis cache server and the file further includes:
[0022] Call the interface server to check whether the token is valid;
[0023] If the token expires, the old token is used to refresh the token and obtain a new token.
[0024] In one implementation, updating the value of the Redis cache server renewal key includes:
[0025] Set the value of the Redis cache server renewal key to the delay time after 1 day.
[0026] In a second aspect, an embodiment of the present invention further provides a Redis interface cache control system for a sports industry system, wherein the system includes: a front end, a gateway, a Redis cache server, and an interface server. The gateway is used to implement the steps of the Redis interface cache control method for the sports industry system described in any one of the above solutions. The gateway includes:
[0027] The cache value acquisition module is used to determine whether to enable the interface cache after the gateway receives the request information, and obtain the cache value corresponding to the request information from the Redis cache server after the interface cache is enabled;
[0028] A cache content reading module is used to read the corresponding cache content from the file if the cache value is in the Redis cache server, and feed the cache content back to the front end;
[0029] The data writing and renewal key setting module is used to call the interface server to obtain the corresponding data if the cache value is not in the Redis cache server, and write the data to the Redis cache server and the file, and set the renewal key value of the Redis cache server based on the business scenario.
[0030] In a third aspect, an embodiment of the present invention further provides a terminal, wherein the terminal includes a memory, a processor, and a Redis interface cache control program for a sports industry system stored in the memory and runnable on the processor. When the processor executes the Redis interface cache control program for the sports industry system, the steps of the Redis interface cache control method for the sports industry system of any one of the above-mentioned schemes are implemented.
[0031] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein a Redis interface cache control program of a sports industry system is stored on the computer-readable storage medium, and the Redis interface cache control program of the sports industry system implements the steps of the Redis interface cache control method of the sports industry system described in any one of the above-mentioned schemes on the computer-readable storage medium.
[0032] Beneficial effect: Compared with the prior art, the present invention provides a Redis interface cache control method for a sports industry system. The present invention first determines whether to enable the interface cache after the gateway receives the request information, and obtains the cache value corresponding to the request information from the Redis cache server after the interface cache is enabled. If the cache value is in the Redis cache server, the corresponding cache content is read from the file, and the cache content is fed back to the front end. If the cache value is not in the Redis cache server, the interface server is called to obtain the corresponding data, and the data is written to the Redis cache server and the file, and the value of the renewal key of the Redis cache server is set based on the business scenario. The present invention uses file cache, which can improve the query speed and query effect compared to database query, and can also turn on or off the interface cache function according to the configuration to meet the needs of different business scenarios. At the same time, by customizing the time of the renewal key of the Redis cache server, the validity period of the cached data can be controlled according to business needs to ensure the timeliness of the cached data. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1This is a flowchart of a preferred embodiment of the Redis interface cache control method for the sports industry system provided by the embodiment of the present invention.
[0034] Figure 2 This is a cache logic flow chart of the Redis interface cache control method for the sports industry system provided by an embodiment of the present invention.
[0035] Figure 3 This is a logical flow chart of cache extension in the Redis interface cache control method for the sports industry system provided by an embodiment of the present invention.
[0036] Figure 4 This is a functional block diagram of the gateway in the Redis interface cache control system of the sports industry system provided by an embodiment of the present invention.
[0037] Figure 5 This is a functional block diagram of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0039] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents, operations, or steps, nor must they be executed in the order described. For example, some operations or steps may be decomposed, combined, or partially merged, so the actual execution order may vary depending on the actual situation.
[0040] It should be understood that the terms used in this specification are only for the purpose of describing particular embodiments and are not intended to limit the present invention. As used in the specification and appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0041] It should be understood that, to facilitate a clear description of the technical solutions of the embodiments of the present invention, in the embodiments of the present invention, terms such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. For example, the first control information and the second control information are merely used to distinguish different control information and do not limit their order.
[0042] Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.
[0043] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0044] In order to solve the problems of the prior art, this embodiment provides a Redis interface cache control method for a sports industry system. In specific applications, this embodiment can first determine whether to enable the interface cache after the gateway receives the request information, and obtain the cache value corresponding to the request information from the Redis cache server after the interface cache is enabled. If the cache value is in the Redis cache server, the corresponding cache content is read from the file, and the cache content is fed back to the front end. If the cache value is not in the Redis cache server, the interface server is called to obtain the corresponding data, and the data is written to the Redis cache server and the file, and the value of the renewal key of the Redis cache server is set based on the business scenario. This implementation uses file caching, which can improve the query speed and query effect compared to database queries, and can also enable or disable the interface cache function according to the configuration to meet the needs of different business scenarios. At the same time, by customizing the time of the Redis cache server renewal key, the validity period of the cached data can be controlled according to business needs to ensure the timeliness of the cached data.
[0045] The Redis interface cache control method of the sports industry system of this embodiment can be applied to a terminal or a gateway. The terminal can be a computer, a mobile phone, a smart TV or other intelligent product terminal. The gateway is used for unified management and forwarding requests. Figure 1 As shown in , taking the gateway as an example, the Redis interface cache control method of the sports industry system of this embodiment includes the following steps:
[0046] Step S100: After receiving the request information, the gateway determines whether to enable the interface cache, and obtains the cache value corresponding to the request information from the Redis cache server after the interface cache is enabled;
[0047] Step S200: If the Redis cache server has the cache value, the corresponding cache content is read from the file and the cache content is fed back to the front end;
[0048] Step S300: If the Redis cache server does not have the cache value, call the interface server to obtain the corresponding data, write the data into the Redis cache server and the file, and set the value of the renewal key of the Redis cache server based on the business scenario.
[0049] Specifically, the sports industry system of this embodiment is a system designed for online scheduling, reservation, and management of gymnasiums. The system provides an interactive interface for front-end users. The front-end is responsible for collecting user operations and inputs and initiating request information to the system back-end. In actual application, after encrypting the parameters and cache identifiers through MD5, the front-end generates request information and transmits it to the gateway. MD5 encryption is used to process the parameters and identifiers, increasing the security and uniqueness of data transmission and preventing data from being tampered with or stolen, facilitating subsequent processing and judgment of requests by the gateway. Combined with Figure 2 As shown, the gateway determines whether to enable interface caching when receiving a request. Specifically, it can be determined whether to enable interface caching according to whether the parameter in the configuration file is 1 or 0. This is a switch mechanism for flexibly controlling whether to use the caching function to meet the requirements of different business scenarios. If the interface caching is enabled, the gateway obtains the cache value corresponding to the request information from the Redis cache server, that is, Figure 2 the Redis cache server value key in
[0050] This embodiment's Redis cache server is used to store data caches and can quickly read and write data. The gateway performs cache management and renewal operations through it, improving the data access speed and system performance. Figure 2 Furthermore, if the cache value exists in the Redis cache server, that is, the cache is hit, the corresponding cache content is read from the file and the cache content is fed back to the front-end. In this embodiment, the cache content is stored in the file, which can more persistently store data and can be quickly read and returned to the front-end when needed, reducing the data acquisition time. If the cache value does not exist in the Redis cache server, that is, the cache is not hit, the interface server is called to obtain the corresponding data, and the data is written into the Redis cache server (such as
[0051] Furthermore, this embodiment can set the value of the life extension key of the Redis cache server based on the business scenario. Figure 2 As shown, this embodiment can set the value of the Redis re-life key to the time one day later. In this embodiment, the system can customize the value of the Redis cache server's re-life key according to different business scenarios, that is, customize the cache validity period. The gateway will set the value of the re-life key in Redis to the current time plus the customized number of days. This ensures that the cached data will not expire within the specified time, thereby improving data reuse.
[0052] In one implementation, in order to ensure that the data in the Redis cache server is always relatively up-to-date and valid, and to avoid the need to re-obtain data from the interface server when the client requests due to cache expiration, the response speed and performance of the system are improved. This embodiment traverses all Redis cache server value keys every preset time period and determines the expiration time of each Redis cache server value key. If the expiration time is less than the preset value, call the interface server to obtain the latest data; write the latest data to the Redis cache server and the file, and update the value of the Redis cache server renewal key. Specifically, combined with Figure 3 As shown, this embodiment runs the following scheduled task every 1 minute to obtain all Redis value keys and traverse all Redis value keys. Then it determines whether the Redis value key is about to expire in 10 minutes. In this embodiment, the scheduled task runs once every 1 minute, which is the starting point of the entire cache renewal logic. The role of the scheduled task is to periodically check the cache data in Redis to ensure that the cache that is about to expire is discovered in time. The 1-minute interval is chosen to strike a balance between timeliness and system resource consumption. It will not cause some caches to be discovered after expiration due to a long inspection interval, nor will it occupy too many system resources due to too frequent inspections. In addition, after the scheduled task is started, all value keys in Redis will be traversed. This process is like a comprehensive "patrol" of the Redis cache library to find all cache items that need to be renewed. The traversal operation can ensure that no cache that is about to expire is missed.
[0053] Next, if the Redis value key has not expired (i.e., the expiration time is greater than the preset value of 10 minutes), no processing is required, and it skips to the next loop. If a certain Redis value key is about to expire within 10 minutes, it is marked as an object that needs to be renewed. 10 minutes is a preset value, and this embodiment can be adjusted according to specific business scenarios and system performance requirements. The purpose of setting the preset value is to process the cache that is about to expire in advance, avoiding updating data when the cache actually expires, so as to ensure that the client can obtain valid data from the cache as much as possible when making a request. Through the timing task and the preset expiration threshold, while ensuring the validity of the cache data, unnecessary frequent update operations are avoided, and the system resources are reasonably utilized.
[0054] When it is found that a certain Redis value key is about to expire (i.e., the expiration time is less than the preset value of 10 minutes), the corresponding parameters are obtained according to the Redis parameter key. These parameters are the necessary information for calling the interface server to obtain the latest data. Then, these parameters are used to call the interface server to send a request to the interface server to obtain the latest data. The interface server will execute the corresponding business logic according to these parameters and return the latest result. Specifically, in this embodiment, when obtaining the latest data, the renewal time of the renewal key of the corresponding Redis cache server can be obtained first. If the renewal time is greater than the current time, the parameters are obtained according to the Redis cache server parameter key. Then, based on the obtained parameters, the interface server is called to send a request to the interface server to obtain the latest data. Next, this embodiment can write the latest data into the Redis cache server and the file, and update the value of the Redis cache server renewal key. This embodiment writes the data into the Redis cache server to ensure that subsequent client requests can directly obtain the latest data from the cache, improving the system response speed. And writing the data into the file is to achieve the persistent storage of the data, preventing the data from being lost or the Redis cache server from malfunctioning and being able to recover the data from the file. At the same time, the value of the Redis cache server renewal key will also be updated, setting it to a new expiration time, thus completing the renewal operation of this cache item. For example, the value of the Redis cache server renewal key is set to the delay time after 1 day.
[0055] Further, in combination with Figure 3As shown, this embodiment writes the latest data to the Redis cache server and file, and also calls the interface server to check whether the Token is expired. If the Token is expired, the old Token is used to refresh the Token and obtain a new Token. This shows that by updating the cache that is about to expire in advance, the need to re-obtain data from the interface server due to cache expiration when the client requests is reduced, thereby significantly shortening the system's response time and improving the overall performance of the system. This embodiment can obtain the latest data from the interface server in a timely manner and update it to the cache, ensuring that the client can obtain relatively the latest information and improving the user experience.
[0056] In summary, in this embodiment, when the gateway receives the request information, it first determines whether to turn on the interface cache, and obtains the cache value corresponding to the request information from the Redis cache server after the interface cache is turned on. If the cache value is in the Redis cache server, the corresponding cache content is read from the file, and the cache content is fed back to the front end. If the cache value is not in the Redis cache server, the interface server is called to obtain the corresponding data, and the data is written to the Redis cache server and the file, and the value of the renewal key of the Redis cache server is set based on the business scenario. The present invention uses file caching, which can improve the query speed and query effect compared to database queries, and can also turn on or off the interface cache function according to the configuration to meet the needs of different business scenarios. At the same time, by customizing the time of the Redis cache server renewal key, the validity period of the cached data can be controlled according to business needs to ensure the timeliness of the cached data.
[0057] Based on the above embodiment, the present invention also provides a Redis interface cache control system for a sports industry system, the system comprising: a front end, a gateway, a Redis cache server and an interface server. The gateway is used to implement the steps of the Redis interface cache control method for the sports industry system in the above method embodiment. Figure 4As shown, the gateway includes: a cache value acquisition module 10, a cache value acquisition module 20, and a data writing and renewal key setting module 30. The cache value acquisition module 10 is used to determine whether to enable the interface cache after the gateway receives the request information, and to obtain the cache value corresponding to the request information from the Redis cache server after the interface cache is enabled. The cache content reading module 20 is used to read the corresponding cache content from the file if the cache value is in the Redis cache server, and to feed the cache content back to the front end. The data writing and renewal key setting module 30 is used to call the interface server to obtain the corresponding data if the cache value is not in the Redis cache server, and write the data to the Redis cache server and the file, and set the renewal key value of the Redis cache server based on the business scenario.
[0058] In one implementation, the system further includes:
[0059] The parameter encryption module is used for the front end to encrypt the parameters and cache identifiers through MD5, generate request information and transmit it to the gateway.
[0060] In one implementation, the data writing and life-extending key setting module 30 includes:
[0061] The renewal key customization unit is used to set the renewal key value in the Redis cache server to the current time plus a custom number of days based on the business scenario.
[0062] In one implementation, the system further includes:
[0063] An expiration time determination module, configured to traverse all Redis cache server value keys every preset time period and determine the expiration time of each Redis cache server value key;
[0064] The latest data acquisition module is used to call the interface server to obtain the latest data if the expiration time is less than a preset value;
[0065] The latest data storage module is used to write the latest data into the Redis cache server and files, and update the value of the Redis cache server's renewal key.
[0066] In one implementation, the latest data acquisition module includes:
[0067] A renewal time acquisition unit, configured to acquire the renewal time of the renewal key of the corresponding Redis cache server if the expiration time is less than a preset value;
[0068] A parameter acquisition unit, configured to acquire parameters according to a Redis cache server parameter key if the renewal time is greater than the current time;
[0069] The latest data acquisition unit is used to call the interface server based on the acquired parameters and send a request to the interface server to acquire the latest data.
[0070] In one implementation, the latest data storage module further includes:
[0071] Token validity check unit, used to call the interface server to check whether the token is valid;
[0072] The token refresh unit is used to refresh the token with the old token if the token expires and obtain a new token.
[0073] In one implementation, the latest data storage module further includes:
[0074] The life-extending value custom unit is used to set the value of the Redis cache server life-extending key to the delay time after 1 day.
[0075] The working principles of each module in the Redis interface cache control system of the sports industry system in this embodiment are the same as the principles of each step in the above method embodiment, and will not be repeated here.
[0076] Each module in the Redis interface cache control system of the sports industry system can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor in the terminal in hardware form, or stored in the terminal's memory in software form, so that the processor can call and execute the corresponding operations of each module.
[0077] Based on the above embodiment, the present invention further provides a terminal, the principle block diagram of the terminal can be as follows: Figure 5 The terminal may include one or more processors 100 ( Figure 5 Only one is shown in the figure), a memory 101 and a computer program 102 stored in the memory 101 and executable on one or more processors 100. For example, a Redis interface cache control program for a sports industry system. When one or more processors 100 execute the computer program 102, the various steps in the embodiment of the Redis interface cache control method for a sports industry system can be implemented. Alternatively, when one or more processors 100 execute the computer program 102, the functions of the various modules / units in the embodiment of the Redis interface cache control system for a sports industry system can be implemented, which is not limited here.
[0078] In one embodiment, the so-called processor 100 may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0079] In one embodiment, the memory 101 may be an internal storage unit of the electronic device, such as the hard disk or memory of the electronic device. The memory 101 may also be an external storage device of the electronic device, such as a plug-in hard disk equipped on the electronic device, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the memory 101 may also include both an internal storage unit and an external storage device of the electronic device. The memory 101 is used to store computer programs and other programs and data required by the terminal. The memory 101 may also be used to temporarily store data that has been output or is to be output.
[0080] Those skilled in the art can understand that Figure 5 the principle block diagram shown in
[0081] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, operational database, or other medium used in the embodiments provided by the present invention can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0082] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or equivalently replace some of the technical features. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A Redis interface cache control method for a sports industry system, characterized in that, The method comprises: When the gateway receives the request information, it determines whether to enable the interface cache, and obtains the cache value corresponding to the request information from the Redis cache server after the interface cache is enabled; If the cache value exists in the Redis cache server, the corresponding cache content is read from the file and the cache content is fed back to the front end; If the Redis cache server does not have the cache value, the interface server is called to obtain the corresponding data, and the data is written to the Redis cache server and the file, and the value of the renewal key of the Redis cache server is set based on the business scenario.
2. The Redis interface cache control method of the sports industry system according to claim 1, wherein The method further comprises: The front end encrypts the parameters and cache identifiers through MD5, generates request information, and transmits it to the gateway.
3. The Redis interface cache control method for the sports industry system according to claim 1, characterized in that, The value of the renewal key of the Redis cache server is set based on the business scenario, including: Based on the business scenario, set the value of the renewal key in the Redis cache server to the current time plus a custom number of days.
4. The Redis interface cache control method for the sports industry system according to claim 1, characterized in that The method further comprises: Traverse all Redis cache server value keys every preset time period and determine the expiration time of each Redis cache server value key; If the expiration time is less than the preset value, call the interface server to obtain the latest data; Write the latest data to the Redis cache server and file, and update the value of the Redis cache server's renewal key.
5. The Redis interface cache control method for the sports industry system according to claim 4, characterized in that, If the expiration time is less than a preset value, calling the interface server to obtain the latest data includes: If the expiration time is less than the preset value, obtain the renewal time of the renewal key of the corresponding Redis cache server; If the renewal time is greater than the current time, the parameters are obtained according to the Redis cache server parameter key; Call the interface server based on the obtained parameters and send a request to the interface server to obtain the latest data.
6. The Redis interface cache control method of the sports industry system according to claim 4, characterized in that, The latest data written to the Redis cache server and file also includes: Call the interface server to check whether the token is valid; If the token expires, the old token is used to refresh the token and obtain a new token.
7. The Redis interface cache control method of the sports industry system according to claim 4, characterized in that, The updating of the value of the Redis cache server renewal key includes: Set the value of the Redis cache server renewal key to the delay time after 1 day.
8. A Redis interface cache control system for a sports industry system, characterized in that, The system includes: a front end, a gateway, a Redis cache server and an interface server. The gateway is used to implement the steps of the Redis interface cache control method of the sports industry system according to any one of claims 1 to 7. The gateway includes: The cache value acquisition module is used to determine whether to enable the interface cache after the gateway receives the request information, and obtain the cache value corresponding to the request information from the Redis cache server after the interface cache is enabled; A cache content reading module is used to read the corresponding cache content from the file if the cache value is in the Redis cache server, and feed the cache content back to the front end; The data writing and renewal key setting module is used to call the interface server to obtain the corresponding data if the cache value is not in the Redis cache server, and write the data to the Redis cache server and the file, and set the renewal key value of the Redis cache server based on the business scenario.
9. A terminal, characterized in that, The terminal includes a memory, a processor, and a Redis interface cache control program for the sports industry system stored in the memory and runnable on the processor. When the processor executes the Redis interface cache control program for the sports industry system, the steps of the Redis interface cache control method for the sports industry system as described in any one of claims 1-7 are implemented.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a Redis interface cache control program for the sports industry system, and the Redis interface cache control program for the sports industry system implements the steps of the Redis interface cache control method for the sports industry system as described in any one of claims 1-7 on the computer-readable storage medium.