Returns an invariant key for an AFF4 object.

    The object will be cached based on this key. This function is specifically
    extracted to ensure that we encapsulate all security critical aspects of the
    AFF4 object so that objects do not leak across security boundaries.

    Args:
       urn: The urn of the object.
       age: The age policy used to build this object. Should be one of
         ALL_TIMES, NEWEST_TIME or a range.

    Returns:
       A key into the cache.

def _MakeCacheInvariant(self, urn, age):
    """Returns an invariant key for an AFF4 object.

    The object will be cached based on this key. This function is specifically
    extracted to ensure that we encapsulate all security critical aspects of the
    AFF4 object so that objects do not leak across security boundaries.

    Args:
       urn: The urn of the object.
       age: The age policy used to build this object. Should be one of
         ALL_TIMES, NEWEST_TIME or a range.

    Returns:
       A key into the cache.
    """
    precondition.AssertType(urn, Text)
    return "%s:%s" % (urn, self.ParseAgeSpecification(age))