Returns true if the cache is valid

@return true if the cache is valid
190315
protected boolean isCacheValid() {

		return StringUtils.equals(cacheProperties.getProperty(JawrConfig.JAWR_CHARSET_NAME),
				config.getResourceCharset().name());

	}
371666
public function validate()
    {
        $u = new User();
        if ($u->isSuperUser()) {
            return true;
        }
        $app = Application::getFacadeApplication();
        $cache = $app->make('cache/request');
        $object = $this->getPermissionObject();
        if (is_object($object)) {
            $identifier = sprintf('permission/key/%s/%s', $this->getPermissionKeyHandle(), $object->getPermissionObjectIdentifier());
        } else {
            $identifier = sprintf('permission/key/%s', $this->getPermissionKeyHandle());
        }
        $item = $cache->getItem($identifier);
        if (!$item->isMiss()) {
            return $item->get();
        }
        $pae = $this->getPermissionAccessObject();
        if (is_object($pae)) {
            $valid = $pae->validate();
        } else {
            $valid = false;
        }

        $cache->save($item->set($valid));

        return $valid;
    }
394040
public function valid()
	{
		if( $this->next() )
			return TRUE;
		if( is_resource( $this->filePointer ) )
			fclose( $this->filePointer );
		return FALSE;
	}
77514
protected function checkCacheVersion()
    {
        $fileName = $this->getVersionFileName();

        if (!file_exists($fileName)) {
            return false;
        }

        $version = md5($this->boltVersion);
        $cached = file_get_contents($fileName);

        if ($version === $cached) {
            return true;
        }
        $this->versionChange = true;

        return false;
    }
1265979
public synchronized boolean isValid()
   {
      if (tc.isEntryEnabled()) SibTr.entry(this, tc, "isValid");
      if (tc.isEntryEnabled()) SibTr.exit(this, tc, "isValid", ""+valid);
      return valid;
   }
687182
protected void checkCacheVersion() {
        // Be very aggressive in invalidating the cache.
        boolean invalidate = true;
        try {
            Get get = new Get.Builder(getDefaultIndexName(), "instance").type("dataVersion").build(); //$NON-NLS-1$ //$NON-NLS-2$
            JestResult result = getClient().execute(get);
            if (result.isSucceeded()) {
                String latestDV = result.getJsonObject().get("_version").getAsString(); //$NON-NLS-1$
                if (latestDV != null && dataVersion != null && latestDV.equals(dataVersion)) {
                    invalidate = false;
                } else {
                    dataVersion = latestDV;
                }
            }
        } catch (IOException e) {
            logger.warn("Elasticsearch is not available, using cache");
            invalidate = false;
        }
        if (invalidate) {
            invalidateCache();
        }
    }
580459
public function valid()
    {
        if ($this->container['transcoderWatermark'] === null) {
            return false;
        }
        if ($this->container['serverVersion'] === null) {
            return false;
        }
        if ($this->container['gpuAcceleration'] === null) {
            return false;
        }
        if ($this->container['wseName'] === null) {
            return false;
        }
        if ($this->container['transcoderLicensed'] === null) {
            return false;
        }
        if ($this->container['javaMaxHeapSize'] === null) {
            return false;
        }
        if ($this->container['transcoderLicensesInUse'] === null) {
            return false;
        }
        if ($this->container['javaVersion'] === null) {
            return false;
        }
        if ($this->container['httpOriginAvailable'] === null) {
            return false;
        }
        if ($this->container['serverName'] === null) {
            return false;
        }
        if ($this->container['osArchitecture'] === null) {
            return false;
        }
        if ($this->container['drmApplications'] === null) {
            return false;
        }
        if ($this->container['javaVMVersion'] === null) {
            return false;
        }
        if ($this->container['transcoderLicenses'] === null) {
            return false;
        }
        if ($this->container['timeRunning'] === null) {
            return false;
        }
        if ($this->container['licenseType'] === null) {
            return false;
        }
        if ($this->container['osBitness'] === null) {
            return false;
        }
        if ($this->container['dvrApplications'] === null) {
            return false;
        }
        if ($this->container['osVersion'] === null) {
            return false;
        }
        if ($this->container['serverBuild'] === null) {
            return false;
        }
        if ($this->container['javaName'] === null) {
            return false;
        }
        if ($this->container['maxConnections'] === null) {
            return false;
        }
        if ($this->container['dvrLicensed'] === null) {
            return false;
        }
        if ($this->container['serverMode'] === null) {
            return false;
        }
        if ($this->container['javaBitness'] === null) {
            return false;
        }
        if ($this->container['currentConnections'] === null) {
            return false;
        }
        if ($this->container['drmLicensed'] === null) {
            return false;
        }
        if ($this->container['javaVendor'] === null) {
            return false;
        }
        if ($this->container['osName'] === null) {
            return false;
        }
        if ($this->container['version'] === null) {
            return false;
        }
        if ($this->container['transcoderApplications'] === null) {
            return false;
        }
        if ($this->container['transcoderAvailable'] === null) {
            return false;
        }
        if ($this->container['javaHome'] === null) {
            return false;
        }
        if ($this->container['maxIncommingStreams'] === null) {
            return false;
        }
        if ($this->container['totalMemory'] === null) {
            return false;
        }
        if ($this->container['availableMemory'] === null) {
            return false;
        }
        if ($this->container['nativeBase'] === null) {
            return false;
        }
        if ($this->container['dvrInUse'] === null) {
            return false;
        }
        if ($this->container['drmInUse'] === null) {
            return false;
        }
        if ($this->container['licenseExpireDate'] === null) {
            return false;
        }
        if ($this->container['processorCores'] === null) {
            return false;
        }
        if ($this->container['restAPIAvailable'] === null) {
            return false;
        }
        return true;
    }
802851
def is_valid(self) -> bool:
        
        return CRCPubkey.from_pubkey(self.pubkey).crc == self.crc
694501
public boolean isValid() {
        boolean valid = true;
        for (PolygonMarkers polygon : polygonMarkers) {
            valid = polygon.isValid();
            if (!valid) {
                break;
            }
        }
        return valid;
    }
453956
public boolean isValid() {

        boolean valid = true;

        switch (shapeType) {

            case POLYLINE_MARKERS:
                valid = ((PolylineMarkers) shape).isValid();
                break;
            case POLYGON_MARKERS:
                valid = ((PolygonMarkers) shape).isValid();
                break;
            case MULTI_POLYLINE_MARKERS:
                valid = ((MultiPolylineMarkers) shape).isValid();
                break;
            case MULTI_POLYGON_MARKERS:
                valid = ((MultiPolygonMarkers) shape).isValid();
                break;
            case COLLECTION:
                @SuppressWarnings("unchecked")
                List<GoogleMapShape> shapeList = (List<GoogleMapShape>) shape;
                for (GoogleMapShape shapeListItem : shapeList) {
                    valid = shapeListItem.isValid();
                    if (!valid) {
                        break;
                    }
                }
                break;
            default:
        }

        return valid;
    }
1082766
public function valid()
    {
        if (isset($this->buffer[$this->position])) {
            return (bool) $this->buffer[$this->position];
        }
        $this->ensurePosition();
        return $this->resultSet->valid();
    }
1019249
public function valid()
    {
        if (!isset($this->_results[$this->key()])) {
            return false;
        }

        $this->_current = $this->_results[$this->key()];

        return true;
    }
1298653
public boolean isCacheable(ExCache cache, Object target, Object[] arguments, Object result) throws Exception {
        if (null == cache || cache.expire() < 0 || cache.key().length() == 0) {
            return false;
        }
        boolean rv = true;
        if (null != cache.condition() && cache.condition().length() > 0) {
            rv = this.getElValue(cache.condition(), target, arguments, result, true, Boolean.class);
        }
        return rv;
    }
784681
@Override
	public boolean isValid() {
		if (_valid == null) {
			final byte[] check = bit.newArray(_validAlleles.length());
			_valid = _genes.forAll(g -> !getAndSet(check, g.getAlleleIndex()));
		}

		return _valid;
	}
1195963
public function isValid() {
		$this->apiTokens = $this->_loadApiTokens ();
		$key = $this->_getHeaderToken ();
		if ($this->apiTokens->isExpired ( $key )) {
			return false;
		} else {
			$this->_addHeaderToken ( $key );
			return true;
		}
	}
576042
@Delete
    public Maybe<Boolean> invalidateCaches() {
        return Flowable.fromIterable(cacheManager.getCacheNames())
                .map(cacheManager::getCache)
                .flatMap(c ->
                        Publishers.fromCompletableFuture(() -> c.async().invalidateAll())
                ).reduce((aBoolean, aBoolean2) -> aBoolean && aBoolean2);
    }
1254250
public function valid(): bool
    {
        if ($this->cacheEntriesIterator === null) {
            $this->rewind();
        }
        return $this->cacheEntriesIterator->valid();
    }