Get the cached resource, or {@code null}
558331
public T get(GVRAndroidResource androidResource) {
        WeakReference<T> reference = cache.get(androidResource);
        if (reference == null) {
            // Not in map
            // Log.d(TAG, "get(%s) returning %s", androidResource, null);
            return null;
        }
        T cached = reference.get();
        if (cached == null) {
            // In map, but not in memory
            cache.remove(androidResource);
        } else {
            // No one will ever read this stream
            androidResource.closeStream();
        }
        // Log.d(TAG, "get(%s) returning %s", androidResource, cached);
        return cached;
    }
538038
def get_resource(uri)
      clear
      uri = URI.parse(uri)
      @req = Net::HTTP::Get.new uri.request_uri
      set_common_info(@req)
      cache = @cache.get(uri.to_s)
      unless cache.nil?
        @req['If-Modified-Since'] = cache.last_modified unless cache.last_modified.nil?
        @req['If-None-Match'] = cache.etag unless cache.etag.nil?
      end
      @http_class.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|
        @res = http.request(@req)
        case @res
          when Net::HTTPOK
            if Atom::MediaType::ENTRY.is_a?(@res['Content-Type'])
              @rc = Atom::Entry.new :stream => @res.body
            else
              @rc = @res.body
            end
            @cache.put uri.to_s, {
              :rc            => @rc,
              :last_modified => @res['Last-Modified'],
              :etag          => @res['ETag'] }
          when Net::HTTPNotModified
            unless cache.nil?
              @rc = cache.rc
            else
              raise CacheNotFoundError, "Got Not-Modified response, but has no cache."
            end
          else
            raise RequestError, "Failed to get content. #{@res.code}"
        end
      end
    end
1195814
def get(self, resource):
        
        prefix, path = resource.finder.get_cache_info(resource)
        if prefix is None:
            result = path
        else:
            result = os.path.join(self.base, self.prefix_to_dir(prefix), path)
            dirname = os.path.dirname(result)
            if not os.path.isdir(dirname):
                os.makedirs(dirname)
            if not os.path.exists(result):
                stale = True
            else:
                stale = self.is_stale(resource, path)
            if stale:
                # write the bytes of the resource to the cache location
                with open(result, 'wb') as f:
                    f.write(resource.bytes)
        return result
108608
@Override
	public synchronized CacheObject get(final Object key)
	{
		final CacheObject o = map.get(key);
		if (o != null) {
			updateAccess(o);
			++hits;
		}
		else
			++misses;
		return o;
	}
531883
public static cacheobject[] get(nitro_service service) throws Exception{
		cacheobject obj = new cacheobject();
		cacheobject[] response = (cacheobject[])obj.get_resources(service);
		return response;
	}
1372667
@Nullable
  public CloseableReference<CloseableImage> getCachedImage(@Nullable CacheKey cacheKey) {
    MemoryCache<CacheKey, CloseableImage> memoryCache = mBitmapMemoryCache;
    if (memoryCache == null || cacheKey == null) {
      return null;
    }
    CloseableReference<CloseableImage> closeableImage = memoryCache.get(cacheKey);
    if (closeableImage != null && !closeableImage.get().getQualityInfo().isOfFullQuality()) {
      closeableImage.close();
      return null;
    }
    return closeableImage;
  }
375137
@Override
  public V get(K k) throws ExecutionException {
    V value = getIfPresent(k);
    if (null == value) {
      try {
        value = cacheLoader.load(k);
        if (null != value) {
          put(k, value);
        }
      } catch (Exception e) {
        LOGGER.warn("Failed to load value for the cache {}", e);
      }
    }
    //LOGGER.debug("get {} = {}", k, value);
    return value;
  }
989990
@Override
    public V get(Object key) {
        if (key == null) {
            throw new NullPointerException();
        }
        
        CachedValue<K, V> entry = map.get(key);
        if (entry == null) {
            return null;
        }
        if (isValueExpired(entry)) {
            if (map.remove(key, entry)) {
                onValueRemove(entry);
                return null;
            }
            return get(key);
        }
        return readValue(entry);
    }
452589
@Override
   protected URL findResource(String name) {
      if (resourceCache.containsKey(name)) {
         return resourceCache.get(name);
      }

      for (WeakReference<Bundle> ref : bundles) {
         final Bundle bundle = ref.get();
         if (bundle != null && bundle.getState() == Bundle.ACTIVE) {
            try {
               final URL resource = bundle.getResource(name);
               if (resource != null) {
                  resourceCache.put(name, resource);
                  return resource;
               }
            } catch (Exception ignore) {
            }
         }
      }

      // TODO: Error?
      return null;
   }
687655
public static Resource getResource(Object adaptable) {
    if (adaptable instanceof Resource) {
      return (Resource)adaptable;
    }
    else if (adaptable instanceof SlingHttpServletRequest) {
      SlingHttpServletRequest request = (SlingHttpServletRequest)adaptable;
      return request.getResource();
    }
    return null;
  }
794393
void get(
    Object rootValue, 
    MatchSpaceKey msg,
    EvalCache cache,
    Object contextValue,
    SearchResults result)
    throws MatchingException, BadMessageFormatMatchingException
  {
      vacantChildGet(null, msg, cache, contextValue, result);
  }
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();
    }
  }
1204940
private Resource mightCache(String key, Resource fileResource) {
        if ( ! isDevMode() ) {
            lookupCache.put(key,fileResource);
        }
        return fileResource;
    }
1175450
@Override
    @SuppressWarnings("unchecked")
    public V get(Object key) {
        final Element element = this.cache.get((Serializable) key);
        if (element == null) {
            return null;
        }

        return (V) element.getObjectValue();
    }
374226
public function cachedData()
    {
        if (!$this->isCached()) {
            return null;
        }

        $contents = file_get_contents($this->file);

        $serializationEnabled = static::config('serialize');

        $data = $serializationEnabled ? unserialize($contents) : $contents;

        return $data;
    }
923402
public ICache getCache(String name) {
        return cacheFactory != null ? cacheFactory.createCache(name) : null;
    }
564893
public static URL getResource(String ref) {

		URL url = null;
		
		for (int i=0;i<locations.size();i++) {
			ResourceLocation location = (ResourceLocation) locations.get(i);
			url = location.getResource(ref);
			if (url != null) {
				break;
			}
		}
		
		if (url == null)
		{
			throw new RuntimeException("Resource not found: "+ref);
		}
			
		return url;
	}