Keyword-Indexed Cache Deletion for NGINX CDN Batch Purging
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
CDN servers based on NGINX lack efficient batch deletion capabilities for cached content, particularly for content with common characteristics, leading to low efficiency and resource wastage, especially when dealing with sensitive or unsafe resources.
Innovation Solution
A batch deletion method involving adding keywords to content identifiers, saving them separately, and using keyword-based queries to locate and delete cached resources, ensuring efficient and customized deletion.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If a CDN server based on NGINX is used, then the server structure is simple and easy to operate, but it only supports a narrow range of content deletion functions and does not support timely batch deletion of content with common characteristics
Solution Approach 1:
The patent segments the content deletion process by introducing keyword tags that categorize cached content into different groups. Instead of treating all content deletion uniformly, the system divides content into searchable categories using keywords, enabling selective batch deletion while maintaining the simplicity of the underlying NGINX server structure.
Solution Approach 2:
The patent introduces an intermediary layer (the keyword tagging and management system) between the simple NGINX server and the complex requirement for batch deletion. This intermediary enables sophisticated content identification and deletion capabilities without modifying the core NGINX server, thus maintaining ease of operation while expanding functionality.
2Measurement precision
If accurate and complete URLs are obtained to delete corresponding resources, then deletion precision is improved, but the process becomes extremely inefficient
Solution Approach 1:
The patent applies preliminary action by pre-tagging cached content with keywords during the caching process. When deletion is needed, the system can quickly retrieve pre-categorized content identifiers through keyword matching, eliminating the need to manually obtain and verify complete URLs at deletion time, thus achieving both accuracy and efficiency.
Solution Approach 2:
The patent creates a simplified copy of content identification through keyword tags. Instead of working with complete, complex URLs, the system uses concise keyword identifiers that represent groups of content, making the deletion process faster while maintaining the ability to precisely identify target content through the keyword index.
3Reliability
If a server disk is formatted to remove sensitive or unsafe resources, then all sensitive content is completely removed, but all content has to be re-cached causing serious resource wastage
Solution Approach 1:
The patent applies preliminary action by pre-tagging content with keywords during the caching process, including safety-related keywords. When sensitive content needs to be removed, the system can quickly identify and delete only the tagged content through keyword queries, avoiding the need to format the entire disk and re-cache all content, thus preserving both safety and reducing resource waste.
Solution Approach 2:
The patent applies local quality by enabling different deletion strategies for different portions of cached content based on keyword tags. Instead of uniformly formatting the entire disk, the system can selectively delete only the local portion of content marked with sensitive keywords, maintaining safety requirements while preserving the majority of cached content and avoiding unnecessary resource consumption.
Data Source
Figure 1
Figure 2
Figure 3~4
AI summary
A batch deletion method and apparatus for cache contents, a device and a readable storage medium. The method comprises: adding keywords to content identifiers of cache contents(S101); saving the content identifiers separately (S102); when cache resources need to be deleted, querying, according to the keywords, content identifiers meeting a condition (S103); determining, according to these content identifiers, storage paths of corresponding cache resources(S104); and finally, deleting the located cache resources one by one (S105).