public function setNextToBePublished()
    {
        $next = $this->find()
            ->where([
                sprintf('%s.active', $this->getAlias()) => true,
                sprintf('%s.created >', $this->getAlias()) => new Time,
            ])
            ->order([sprintf('%s.created', $this->getAlias()) => 'ASC'])
            ->extract('created')
            ->first();

        $next = empty($next) ? false : $next->toUnixString();

        Cache::write('next_to_be_published', $next, $this->getCacheName());

        return $next;
    }
public function setNextToBePublished()
    {
        $next = $this->find()
            ->where([
                sprintf('%s.active', $this->getAlias()) => true,
                sprintf('%s.created >', $this->getAlias()) => new Time,
            ])
            ->order([sprintf('%s.created', $this->getAlias()) => 'ASC'])
            ->extract('created')
            ->first();

        $next = empty($next) ? false : $next->toUnixString();

        Cache::write('next_to_be_published', $next, $this->getCacheName());

        return $next;
    }
public function setNextToBePublished ( ) { $ next = $ this -> find ( ) -> where ( [ sprintf ( '%s.active' , $ this -> getAlias ( ) ) => true , sprintf ( '%s.created >' , $ this -> getAlias ( ) ) => new Time , ] ) -> order ( [ sprintf ( '%s.created' , $ this -> getAlias ( ) ) => 'ASC' ] ) -> extract ( 'created' ) -> first ( ) ; $ next = empty ( $ next ) ? false : $ next -> toUnixString ( ) ; Cache :: write ( 'next_to_be_published' , $ next , $ this -> getCacheName ( ) ) ; return $ next ; }
Sets to cache the timestamp of the next record to be published.
This value can be used to check if the cache is valid
@return string|bool Timestamp or `false`
@uses $cache
Sets to cache the timestamp of the next record to be published . This value can be used to check if the cache is valid