mirror of
				https://github.com/TeaOSLab/EdgeNode.git
				synced 2025-11-04 16:00:25 +08:00 
			
		
		
		
	
		
			
	
	
		
			15 lines
		
	
	
		
			204 B
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			15 lines
		
	
	
		
			204 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| 
								 | 
							
								package caches
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								import "time"
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								type Item struct {
							 | 
						||
| 
								 | 
							
									Key       string
							 | 
						||
| 
								 | 
							
									ExpiredAt int64
							 | 
						||
| 
								 | 
							
									ValueSize int64
							 | 
						||
| 
								 | 
							
									Size      int64
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								func (this *Item) IsExpired() bool {
							 | 
						||
| 
								 | 
							
									return this.ExpiredAt < time.Now().Unix()
							 | 
						||
| 
								 | 
							
								}
							 |