mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 00:20:25 +08:00 
			
		
		
		
	Fix captcha (#14488)
Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
		
							
								
								
									
										20
									
								
								modules/cache/cache.go
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										20
									
								
								modules/cache/cache.go
									
									
									
									
										vendored
									
									
								
							@@ -27,24 +27,6 @@ func newCache(cacheConfig setting.Cache) (mc.Cache, error) {
 | 
			
		||||
	})
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Cache is the interface that operates the cache data.
 | 
			
		||||
type Cache interface {
 | 
			
		||||
	// Put puts value into cache with key and expire time.
 | 
			
		||||
	Put(key string, val interface{}, timeout int64) error
 | 
			
		||||
	// Get gets cached value by given key.
 | 
			
		||||
	Get(key string) interface{}
 | 
			
		||||
	// Delete deletes cached value by given key.
 | 
			
		||||
	Delete(key string) error
 | 
			
		||||
	// Incr increases cached int-type value by given key as a counter.
 | 
			
		||||
	Incr(key string) error
 | 
			
		||||
	// Decr decreases cached int-type value by given key as a counter.
 | 
			
		||||
	Decr(key string) error
 | 
			
		||||
	// IsExist returns true if cached value exists.
 | 
			
		||||
	IsExist(key string) bool
 | 
			
		||||
	// Flush deletes all cached data.
 | 
			
		||||
	Flush() error
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// NewContext start cache service
 | 
			
		||||
func NewContext() error {
 | 
			
		||||
	var err error
 | 
			
		||||
@@ -59,7 +41,7 @@ func NewContext() error {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// GetCache returns the currently configured cache
 | 
			
		||||
func GetCache() Cache {
 | 
			
		||||
func GetCache() mc.Cache {
 | 
			
		||||
	return conn
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user