code: func shouldCache(attr authorizer.Attributes) bool {
  	controlledAttrSize := int64(len(attr.GetNamespace())) +
  		int64(len(attr.GetVerb())) +
  		int64(len(attr.GetAPIGroup())) +
  		int64(len(attr.GetAPIVersion())) +
  		int64(len(attr.GetResource())) +
  		int64(len(attr.GetSubresource())) +
  		int64(len(attr.GetName())) +
  		int64(len(attr.GetPath()))
  	return controlledAttrSize < maxControlledAttrCacheSize
  }
docs: // shouldCache determines whether it is safe to cache the given request attributes. If the
  // requester-controlled attributes are too large, this may be a DoS attempt, so we skip the cache.