Lines Matching refs:cache
10 * Used to cache {@see PredictionContext} objects. Its used for the shared
11 * context cash associated with contexts in DFA states. This cache
17 protected $cache;
21 $this->cache = new Map();
25 * Add a context to the cache and return it. If the context already exists,
26 * return that one instead and do not add a new context to the cache.
27 * Protect shared cache from unsafe thread access.
35 $existing = $this->cache->get($ctx);
41 $this->cache->put($ctx, $ctx);
48 return $this->cache->get($ctx);
53 return $this->cache->count();