Added invalidate cache button (through a generic APIButton widget)
This commit is contained in:
@@ -52,6 +52,11 @@ func (s *Service) LoadScripts() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *Service) InvalidateCache() {
|
||||
log.Printf("Invalidating monitor cache")
|
||||
s.scriptOutputCache = map[string]cacheEntry{}
|
||||
}
|
||||
|
||||
func (s *Service) GetOutput(command string) (string, error) {
|
||||
// check if output is present in cache
|
||||
if entry, found := s.scriptOutputCache[command]; found {
|
||||
|
||||
Reference in New Issue
Block a user