Get dns cache.

@return dns cache. return {@code null} if no entry for host or dns cache is expired.
@throws DnsCacheManipulatorException Operation fail
760918
@Nullable
    public static DnsCacheEntry getDnsCache(String host) {
        try {
            return InetAddressCacheUtil.getInetAddressCache(host);
        } catch (Exception e) {
            throw new DnsCacheManipulatorException("Fail to getDnsCache, cause: " + e.toString(), e);
        }
    }
453317
protected function getRepositoryUrlCache()
    {
        $repositoryUrlCache = $this->getSession()->get(SessionParameter::REPOSITORY_URL_CACHE);
        if ($repositoryUrlCache === null) {
            $repositoryUrlCache = new RepositoryUrlCache();
            $this->getSession()->put(SessionParameter::REPOSITORY_URL_CACHE, $repositoryUrlCache);
        }

        return $repositoryUrlCache;
    }
1281679
@Override
   public long getCacheGets() {
      Stats stats = cache.getStats();
      return stats.getHits() + stats.getMisses() + unsupportCacheHits.longValue();
   }
101916
@Override
    @PreAuthorize(SpringEvalExpressions.HAS_AUTH_SYSTEM_ADMIN)
    public ResponseEntity<Collection<MgmtSystemCache>> getCaches() {
        final Collection<String> cacheNames = cacheManager.getCacheNames();
        return ResponseEntity
                .ok(cacheNames.stream().map(cacheManager::getCache).map(this::cacheRest).collect(Collectors.toList()));
    }
1355933
public static dnsnsecrec[] get(nitro_service service) throws Exception{
		dnsnsecrec obj = new dnsnsecrec();
		dnsnsecrec[] response = (dnsnsecrec[])obj.get_resources(service);
		return response;
	}
1338675
public Object get(String hostname, int netId) {
        AddressCacheEntry entry = cache.get(new AddressCacheKey(hostname, netId));
        // Do we have a valid cache entry?
        if (entry != null && entry.expiryNanos >= System.nanoTime()) {
            return entry.value;
        }
        // Either we didn't find anything, or it had expired.
        // No need to remove expired entries: the caller will provide a replacement shortly.
        return null;
    }
1125285
private ServiceDirectoryCache<String, ModelService> getCache(){
        if(cache == null){
            synchronized (this) {
                if (this.cache == null) {
                    this.cache = new ServiceDirectoryCache<String, ModelService>();
                }
            }
        }
        return this.cache;
    }
296986
public static dnsaddrec[] get(nitro_service service) throws Exception{
		dnsaddrec obj = new dnsaddrec();
		dnsaddrec[] response = (dnsaddrec[])obj.get_resources(service);
		return response;
	}
415042
@Override
    public List getCacheIdsInPushPullTable() {
        final String methodName = "getCacheIdsInPushPullTable()";
        List list = new ArrayList();
        if (this.featureSupport.isReplicationSupported()) {
            // TODO write code to support getCacheIdsInPushPullTable function
            if (tc.isDebugEnabled()) {
                Tr.debug(tc, methodName + " cacheName=" + cacheName + " ERROR because it is not implemented yet");
            }
        } else {
            Tr.error(tc, "DYNA1065E", new Object[] { methodName, cacheName, this.cacheProviderName });
        }
        return list;
    }
883463
public static void setDnsCache(String host, String... ips) {
        try {
            InetAddressCacheUtil.setInetAddressCache(host, ips, NEVER_EXPIRATION);
        } catch (Exception e) {
            final String message = String.format("Fail to setDnsCache for host %s ip %s, cause: %s",
                    host, Arrays.toString(ips), e.toString());
            throw new DnsCacheManipulatorException(message, e);
        }
    }
717326
@Override
  public LookupExtractor get()
  {
    final Lock readLock = startStopSync.readLock();
    try {
      readLock.lockInterruptibly();
    }
    catch (InterruptedException e) {
      throw new RuntimeException(e);
    }
    try {
      if (entry == null) {
        throw new ISE("Factory [%s] not started", extractorID);
      }
      final CacheScheduler.CacheState cacheState = entry.getCacheState();
      if (cacheState instanceof CacheScheduler.NoCache) {
        final String noCacheReason = ((CacheScheduler.NoCache) cacheState).name();
        throw new ISE("%s: %s, extractorID = %s", entry, noCacheReason, extractorID);
      }
      CacheScheduler.VersionedCache versionedCache = (CacheScheduler.VersionedCache) cacheState;
      Map<String, String> map = versionedCache.getCache();
      final byte[] v = StringUtils.toUtf8(versionedCache.getVersion());
      final byte[] id = StringUtils.toUtf8(extractorID);
      return new MapLookupExtractor(map, isInjective())
      {
        @Override
        public byte[] getCacheKey()
        {
          return ByteBuffer
              .allocate(CLASS_CACHE_KEY.length + id.length + 1 + v.length + 1 + 1)
              .put(CLASS_CACHE_KEY)
              .put(id).put((byte) 0xFF)
              .put(v).put((byte) 0xFF)
              .put(isOneToOne() ? (byte) 1 : (byte) 0)
              .array();
        }
      };
    }
    finally {
      readLock.unlock();
    }
  }
1346469
public static dnssuffix[] get(nitro_service service) throws Exception{
		dnssuffix obj = new dnssuffix();
		dnssuffix[] response = (dnssuffix[])obj.get_resources(service);
		return response;
	}
660333
@Override
    public ImmutableMap<String, JSONObject> pointInTimeCache() {
        if (m_shutdown.get()) {
            throw new RuntimeException("Requested cache from shutdown MapCache.");
        }
        return m_publicCache.get();
    }
13211
public Integer getExpirationCache()
   {
      if (childNode.getTextValueForPatternName("expiration-cache") != null && !childNode.getTextValueForPatternName("expiration-cache").equals("null")) {
         return Integer.valueOf(childNode.getTextValueForPatternName("expiration-cache"));
      }
      return null;
   }
310682
public static dnsnsrec[] get(nitro_service service) throws Exception{
		dnsnsrec obj = new dnsnsrec();
		dnsnsrec[] response = (dnsnsrec[])obj.get_resources(service);
		return response;
	}
831468
@Nullable
    public V get() {
        if (!valueRetrieved) {
            cacheValue = databaseReader.get();
            valueRetrieved = true;
        }
        return cacheValue;
    }
509373
private function getCache()
    {
        // cache for single run
        // so that getLastModified and getContent in single request do not add additional cache roundtrips (i.e memcache)
        if (isset($this->parsed)) {
            return $this->parsed;
        }

        // check from cache first
        $cache = null;
        $cacheId = $this->getCacheId();
        if ($this->cache->isValid($cacheId, 0)) {
            if ($cache = $this->cache->fetch($cacheId)) {
                $cache = unserialize($cache);
            }
        }

        $less = $this->getCompiler();
        $input = $cache ? $cache : $this->filepath;
        $cache = $less->cachedCompile($input);

        if (!is_array($input) || $cache['updated'] > $input['updated']) {
            $cache['lastModified'] = $this->getMaxLastModified($cache);
            $this->cache->store($cacheId, serialize($cache));
        }

        return $this->parsed = $cache;
    }