Return the cached territory occupied by the piece.
175657
def territory(self):
        
        cache_key = (
            self.board.length, self.board.height, self.uid, self.index)
        if cache_key not in self.territory_cache:
            vector = self.compute_territory()
            self.territory_cache[cache_key] = vector
        else:
            vector = self.territory_cache[cache_key]
        return vector
625003
def _get_code(self, key):
        

        data = self.grid.code_array(key)
        self.grid.code_array.result_cache.clear()

        return data
637098
def payload(self):
        """"""
        if not self._decoded_cache:
            self._decoded_cache = self.decode()
        return self._decoded_cache
974472
def cacheable_object(cls):
    

    def reset(self):
        if hasattr(self, '_resettable_cached_properties'):
            self._resettable_cached_properties = {}

    cls.reset = reset
    return cls
601138
def get_storage(clear=False):
    
    portal = getUtility(ISiteRoot)
    annotations = IAnnotations(portal)
    if ANNOTATION_KEY not in annotations or clear:
        annotations[ANNOTATION_KEY] = OOBTree()
    return annotations[ANNOTATION_KEY]
490218
def get_child(self, usage_id):
        """"""
        if usage_id in self._child_cache:
            return self._child_cache[usage_id]

        child_block = self.runtime.get_block(usage_id, for_parent=self)
        self._child_cache[usage_id] = child_block
        return child_block
941987
def _get_destcache(self, graph, orig, branch, turn, tick, *, forward):
        """"""
        destcache, destcache_lru, get_keycachelike, successors, adds_dels_sucpred = self._get_destcache_stuff
        lru_append(destcache, destcache_lru, ((graph, orig, branch), turn, tick), KEYCACHE_MAXSIZE)
        return get_keycachelike(
            destcache, successors, adds_dels_sucpred, (graph, orig),
            branch, turn, tick, forward=forward
        )
1034530
public int getPartition(K key, V value, 
                          int numPartitions) {
    Integer result = cache.get();
    if (result == null) {
      return part.getPartition(key, value, numPartitions);
    } else {
      return result;
    }
  }
914412
private static AvailEntry getAvailEntry(String key, ClassLoader loader) {
        return GET_AVAILABLE_CACHE.getInstance(key, loader);
    }
1083357
def inv(self):
        """"""
        result = Complete(self.r.transpose(), np.dot(self.r.transpose(), -self.t))
        result._cache_inv = self
        return result
519787
def get(self, block_alias, context):
        """"""
        contents = []

        dynamic_block_contents = self.get_contents_dynamic(block_alias, context)
        if dynamic_block_contents:
            contents.append(dynamic_block_contents)

        static_block_contents = self.get_contents_static(block_alias, context)
        if static_block_contents:
            contents.append(static_block_contents)

        if not contents:
            return ''

        return choice(contents)
610262
def cache_property(key, empty, type):
    """"""
    return property(lambda x: x._get_cache_value(key, empty, type),
                    lambda x, v: x._set_cache_value(key, v, type),
                    lambda x: x._del_cache_value(key),
                    'accessor for %r' % key)
914861
def get(self, key):
        

        if not key in self._actions:
            return None
        if not key in self._cache:
            self._cache[key] = self._actions[key]()

        return self._cache[key]
887806
private function getCachedContent()
    {
        $item = null;

        if (null !== $this->cache) {
            $item = $this->cache->getItem($this->cacheKey);
            $cacheContent = $item->get();

            if ($item->isHit() && null !== $cacheContent) {
                $this->contentCache = $cacheContent;
            }
        }

        return $item;
    }
237247
def cached(func):
    """"""
    ret = None

    def call_or_cache(*args, **kwargs):
        nonlocal ret
        if ret is None:
            ret = func(*args, **kwargs)
        return ret

    return call_or_cache
374732
function _getCached( cached, data )
	{
		if( !data ){ return cached; }

		let i = -1, len = cached.length;
        while (++i < len) {
            cached[i].data = data;
        }
        return cached;
	}
297767
def get_memory_cache(self, key=None):
        """"""
        key = self.model.hash if key is None else key
        self._results = self.memory_cache.get(key)
        return self._results