Use this API to expire cachecontentgroup resources.
778717
public static base_responses expire(nitro_service client, cachecontentgroup resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			cachecontentgroup expireresources[] = new cachecontentgroup[resources.length];
			for (int i=0;i<resources.length;i++){
				expireresources[i] = new cachecontentgroup();
				expireresources[i].name = resources[i].name;
			}
			result = perform_operation_bulk_request(client, expireresources,"expire");
		}
		return result;
	}
682497
public void setReleasedAndNotExpired(boolean releasedAndNotExpired) {

        m_releasedAndNotExpired = releasedAndNotExpired;
        if (m_releasedAndNotExpired) {
            removeStyleName(I_CmsLayoutBundle.INSTANCE.containerpageCss().expired());
            if (m_expiredOverlay != null) {
                m_expiredOverlay.removeFromParent();
                m_expiredOverlay = null;
            }

        } else {
            addStyleName(I_CmsLayoutBundle.INSTANCE.containerpageCss().expired());
            m_expiredOverlay = DOM.createDiv();
            m_expiredOverlay.setTitle("Expired resource");
            m_expiredOverlay.addClassName(I_CmsLayoutBundle.INSTANCE.containerpageCss().expiredOverlay());
            getElement().appendChild(m_expiredOverlay);
        }
    }
259407
public function setContents(array $data)
	{
		// make sure we have our expire data key
		if (isset($data[static::EXPIRE_DATA_KEY]))
		{
			// process the expiration settings
			foreach($data[static::EXPIRE_DATA_KEY] as $key => $expiration)
			{
				// if it was set on the last request, make it as loaded
				if ($expiration[1] === static::EXPIRE_STATE_NEW)
				{
					$data[static::EXPIRE_DATA_KEY][$key][1] = static::EXPIRE_STATE_LOADED;
				}

				// if it was already loaded on the last request, and we expire on request, delete it
				elseif ($expiration[0] === EXPIRE_ON_REQUEST and $expiration[1] === static::EXPIRE_STATE_LOADED)
				{
					unset($data[static::EXPIRE_DATA_KEY][$key]);
					\Arr::delete($data, $this->prefixKey($key));
				}
			}
		}
		else
		{
			// not set, create an empty one to start with
			$data[static::EXPIRE_DATA_KEY] = array();
		}

		// store the data
		parent::setContents($data);
	}
199880
def enable_cache(self):
        """"""
        self.set_header('Cache-Control', 'max-age=%d, public' % CACHE_TIME)

        d = datetime.datetime.now() + datetime.timedelta(seconds=CACHE_TIME)
        self.set_header('Expires', d.strftime('%a, %d %b %Y %H:%M:%S'))

        self.set_header('access-control-max-age', CACHE_TIME)
1168795
def expires_on(self):
    """"""
    timestamp = self._info.get('expirationTime', None)
    if timestamp is None:
      return None
    return _parser.Parser.parse_timestamp(timestamp)
949313
def set_cache_expiry(response):
    
    if response.cache_control.max_age is None and 'CACHE_DEFAULT_TIMEOUT' in config.cache:
        response.cache_control.max_age = config.cache['CACHE_DEFAULT_TIMEOUT']
    return response
516248
private void expireSessions(long timestamp) {
    // Iterate through registered sessions.
    for (RaftSession session : sessions.getSessions(primitiveId)) {
      if (session.isTimedOut(timestamp)) {
        log.debug("Session expired in {} milliseconds: {}", timestamp - session.getLastUpdated(), session);
        session = sessions.removeSession(session.sessionId());
        if (session != null) {
          session.expire();
          service.expire(session.sessionId());
        }
      }
    }
  }
28172
@Override
    @Scheduled(fixedRate = REAP_INTERVAL)
    public void removeExpired() {
        final Set<String> reapable = sessions.entrySet().stream()
                .filter(e -> e.getValue().getExpires().isPresent())
                .filter(e -> e.getValue().getExpires().get().isBefore(now()))
                .map(Map.Entry::getKey).collect(toSet());
        reapable.forEach(key -> {
            final FedoraSession s = sessions.get(key);
            if (s != null) {
                try {
                    s.expire();
                } catch (final RepositoryRuntimeException e) {
                    LOGGER.error("Got exception rolling back expired session {}: {}", s, e.getMessage());
                }
            }
            sessions.remove(key);
        });
    }
327652
protected function setCacheContent($key = null, $value = null, $expire = 0, array $tags = [])
    {
        if ($this->cache instanceof CacheInterface && isset($key)) {
            if (!empty($this->cachePlaceholders)) {
                $result = $value;
                $value = [];
                $value['result'] = $result;
                $value['placeholders'] = $this->cachePlaceholders;
            }
            $this->cache->set(
                $key,
                $value,
                $expire,
                is_string($tags) ? explode(',', $tags) : $tags
            );
            $this->cachePlaceholders = [];
        }
    }
1275132
function(event) {
      var d = event.target.ownerDocument || event.target;
      stopMutation(d);
      expireCache(d);
    }
32010
public static base_responses save(nitro_service client, cachecontentgroup resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			cachecontentgroup saveresources[] = new cachecontentgroup[resources.length];
			for (int i=0;i<resources.length;i++){
				saveresources[i] = new cachecontentgroup();
				saveresources[i].name = resources[i].name;
			}
			result = perform_operation_bulk_request(client, saveresources,"save");
		}
		return result;
	}
112828
private <CONTENT extends CmsXmlContent> void removeCachedContent(CmsResource resource, Map<String, CONTENT> cache) {

        Iterator<Map.Entry<String, CONTENT>> iterator = cache.entrySet().iterator();
        while (iterator.hasNext()) {
            Map.Entry<String, CONTENT> entry = iterator.next();
            CONTENT content = entry.getValue();
            CmsResource contentFile = content.getFile();
            if (contentFile.getStructureId().equals(resource.getStructureId())
                || contentFile.getResourceId().equals(resource.getResourceId())) {
                iterator.remove();
            }
        }

    }
962815
public static base_response update(nitro_service client, cachecontentgroup resource) throws Exception {
		cachecontentgroup updateresource = new cachecontentgroup();
		updateresource.name = resource.name;
		updateresource.weakposrelexpiry = resource.weakposrelexpiry;
		updateresource.heurexpiryparam = resource.heurexpiryparam;
		updateresource.relexpiry = resource.relexpiry;
		updateresource.relexpirymillisec = resource.relexpirymillisec;
		updateresource.absexpiry = resource.absexpiry;
		updateresource.absexpirygmt = resource.absexpirygmt;
		updateresource.weaknegrelexpiry = resource.weaknegrelexpiry;
		updateresource.hitparams = resource.hitparams;
		updateresource.invalparams = resource.invalparams;
		updateresource.ignoreparamvaluecase = resource.ignoreparamvaluecase;
		updateresource.matchcookies = resource.matchcookies;
		updateresource.invalrestrictedtohost = resource.invalrestrictedtohost;
		updateresource.polleverytime = resource.polleverytime;
		updateresource.ignorereloadreq = resource.ignorereloadreq;
		updateresource.removecookies = resource.removecookies;
		updateresource.prefetch = resource.prefetch;
		updateresource.prefetchperiod = resource.prefetchperiod;
		updateresource.prefetchperiodmillisec = resource.prefetchperiodmillisec;
		updateresource.prefetchmaxpending = resource.prefetchmaxpending;
		updateresource.flashcache = resource.flashcache;
		updateresource.expireatlastbyte = resource.expireatlastbyte;
		updateresource.insertvia = resource.insertvia;
		updateresource.insertage = resource.insertage;
		updateresource.insertetag = resource.insertetag;
		updateresource.cachecontrol = resource.cachecontrol;
		updateresource.quickabortsize = resource.quickabortsize;
		updateresource.minressize = resource.minressize;
		updateresource.maxressize = resource.maxressize;
		updateresource.memlimit = resource.memlimit;
		updateresource.ignorereqcachinghdrs = resource.ignorereqcachinghdrs;
		updateresource.minhits = resource.minhits;
		updateresource.alwaysevalpolicies = resource.alwaysevalpolicies;
		updateresource.persist = resource.persist;
		updateresource.pinned = resource.pinned;
		updateresource.lazydnsresolve = resource.lazydnsresolve;
		updateresource.hitselector = resource.hitselector;
		updateresource.invalselector = resource.invalselector;
		return updateresource.update_resource(client);
	}
948086
private void applyExpire(ExpireOperation operation) {
    context.setTimestamp(operation.timestamp());
    PrimaryBackupSession session = context.getSession(operation.session());
    if (session != null) {
      context.expireSession(session.sessionId().id());
    }
  }
1090426
def cache_set(self, to_cache):
        
        self.cache.set(self.cache_key, to_cache, self.expire_time)
258418
private void expireSession(long index, long timestamp, ServerSessionContext session, CompletableFuture<Void> future, ThreadContext context) {
    if (!log.isOpen()) {
      context.executor().execute(() -> future.completeExceptionally(new IllegalStateException("log closed")));
      return;
    }

    // If the session is already in an inactive state, complete the future exceptionally.
    if (!session.state().active()) {
      context.executor().execute(() -> future.completeExceptionally(new UnknownSessionException("inactive session: " + session.id())));
      return;
    }

    // Trigger scheduled callbacks in the state machine.
    executor.tick(index, timestamp);

    // Update the state machine context with the unregister entry's index. This ensures that events published
    // within the expire or close methods will be properly associated with the unregister entry's index.
    // All events published during expiration or closing of a session are linearizable to ensure that clients
    // receive related events before the expiration is completed.
    executor.init(index, Instant.ofEpochMilli(timestamp), ServerStateMachineContext.Type.COMMAND);

    // Expire the session and call state machine callbacks.
    session.expire(index);
    for (SessionListener listener : executor.context().sessions().listeners) {
      listener.expire(session);
      listener.close(session);
    }

    // Calculate the last completed index.
    long lastCompleted = calculateLastCompleted(index);

    // Once expiration callbacks have been completed, ensure that events published during the callbacks
    // are published in batch. The state machine context will generate an event future for all published events
    // to all sessions. If the event future is non-null, that indicates events are pending which were published
    // during the call to expire(). Wait for the events to be received by the client before completing the future.
    executor.commit();
    context.executor().execute(() -> {
      setLastCompleted(lastCompleted);
      future.complete(null);
    });
  }
1357924
public static function SetCacheExpire ($cache_expire) {
		if (static::IsSessionActive()) {
			throw CoreException::RaiseSystemError('既にセッションが開始されているため、session_cache_expireを変更できません。session_cache_expire:%s', [$cache_expire]);
		}
		if (static::IsCacheLimiterNoCache()) {
			throw CoreException::RaiseSystemError('キャッシュリミッタがノーキャッシュとなっているため、session_cache_expireを変更できません。session_cache_expire:%s', [$cache_expire]);
		}
		return session_cache_expire($cache_expire);
	}