mirror of
				https://github.com/TeaOSLab/EdgeNode.git
				synced 2025-11-04 07:40:56 +08:00 
			
		
		
		
	缓存策略实现LFU算法/实现内存缓存自动Flush数据到磁盘
This commit is contained in:
		@@ -230,8 +230,9 @@ func TestMemoryStorage_Purge(t *testing.T) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func TestMemoryStorage_Expire(t *testing.T) {
 | 
			
		||||
	storage := NewMemoryStorage(&serverconfigs.HTTPCachePolicy{})
 | 
			
		||||
	storage.purgeDuration = 5 * time.Second
 | 
			
		||||
	storage := NewMemoryStorage(&serverconfigs.HTTPCachePolicy{
 | 
			
		||||
		MemoryAutoPurgeInterval: 5,
 | 
			
		||||
	})
 | 
			
		||||
	err := storage.Init()
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		t.Fatal(err)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user