code: func (c *CacheLazyFill) getEntity(entityType, guid string) (*entity, error) {
  	// Canonicalise guid
  	u, err := uuid.FromString(guid)
  	if err != nil {
  		return nil, err
  	}
  	uuid := u.String()
  
  	// Check if we have it already
  	var rv entity
  	err = c.store.Get(makeCacheStorageKey(entityType, uuid), &rv)
  	switch err {
  	case nil:
  		if rv.TTL.After(time.Now()) {
  			return &rv, nil
  		}
  		// else continue
  	case ErrKeyNotFound:
  		// continue
  	default:
  		return nil, err
  	}
  
  	// Fetch from remote
  	nv, err := c.fetchEntityFromAPI(entityType, uuid)
  	if err != nil {
  		if entityType == "apps" && c.config.IgnoreMissingApps {
  			nv = &entity{}
  		} else {
  			return nil, err
  		}
  	}
  
  	// Save it out
  	err = c.normaliseAndSaveEntityToDatabase(entityType, uuid, nv)
  	if err != nil {
  		return nil, err
  	}
  
  	return nv, nil
  }
docs: // getEntity looks up the entity in the cache, and if not found, or TTL expired, fetches from the server
  // entityType *must* be checked for safety by caller
  // guid will be validated as a guid by this function
  // apps are treated specially, in that if IgnoreMissingApps is set, then an error will result in an empty object returned.
  // Also for apps, we will strip anything that matches StripAppSuffixes from the name before storing.