gofmt changes
Added watchdog for cache invalidation
Refactored constant settings into api struct