public static function setting_cache($pattern, $slug = false) { if ($slug) { Cache::request()->save(Cache::get_conf()->cache_prefix->{$pattern} . $slug, static::$flow[$pattern][$slug], Cache::get_conf()->cache_time->{$pattern}); } else { Cache::request()->save(Cache::get_conf()->cache_prefix->{$pattern}, static::$flow[$pattern], Cache::get_conf()->cache_time->{$pattern}); } }
public function builder() { var_dump(SITESLUG . DIRS . $this->slug); $ranking[$this->slug] = $this->visitas_builder->addFilter(array('_id' => SITESLUG . DIRS . $this->slug))->load()->lista; if (!is_array($ranking[$this->slug])) { $ranking[$this->slug] = array(); } print_r($ranking[$this->slug]); Cache::request()->save(Cache::get_conf()->cache_prefix->visitas . $this->slug, $ranking[$this->slug], Cache::get_conf()->cache_time->visitas); }
public static function rebuild($user) { if (empty(Cache::request()->get('analitica.recomendadas.rebuild.' . $user))) { if (Cache::request()->status_connect()) { Cache::request()->save('analitica.recomendadas.rebuild' . $user, true, Cache::get_conf()->cache_time->analitica_user_recomendados_rebuild); MQ::send_message(MQ::get_conf()->colas->analitica_recomendadas, array("user" => $user)); } else { return false; } } return true; }
public static function setting_cache($slug) { Cache::request()->save(Cache::get_conf()->cache_prefix->tags_info . $slug, static::$tags[$slug], Cache::get_conf()->cache_time->tags_info); }
public static function setting_cache($nid, $part) { Cache::request()->save(Cache::get_conf()->cache_prefix->nota . $nid . '.' . $part, static::$content[$nid][$part], Cache::get_conf()->cache_time->nota); Cachejson::request()->save(Cachejson::get_conf()->cache_prefix->nota . $nid . '.' . $part, static::$content[$nid][$part], Cachejson::get_conf()->cache_time->nota); }
public function make() { $Pattern = $this->patternBuilder->addFields(array("_id"))->addSlug($this->slug)->build(); Cache::request()->save(Cache::get_conf()->cache_prefix->seccion . $this->slug, $Pattern->load(), Cache::get_conf()->cache_time->seccion); }
public static function setting_cache($slug) { Cache::request()->save(Cache::get_conf()->cache_prefix->visitas . $slug, static::$ranking[$slug], Cache::get_conf()->cache_time->visitas); }
public function builder() { var_dump("Corrigiendo bug eliminar"); $Pattern = $this->patternBuilder->addFilter(array('_id' => $this->nid, 'estado' => 'despublicado'))->build(); $this->nota = $Pattern->load(); foreach ($this->nota as $key => $value) { Cache::request()->save(Cache::get_conf()->cache_prefix->nota . $this->nid . '.' . $key, null, Cache::get_conf()->cache_time->nota); Cachejson::request()->save(Cachejson::get_conf()->cache_prefix->nota . $this->nid . '.' . $key, null, Cachejson::get_conf()->cache_time->nota); } Cache::request()->save(Cache::get_conf()->cache_prefix->nota . $this->nid . '.node', null, Cache::get_conf()->cache_time->nota); Cachejson::request()->save(Cachejson::get_conf()->cache_prefix->nota . $this->nid . '.node', null, Cachejson::get_conf()->cache_time->nota); \Rpp\Services\Get\Content::$content = null; \Rpp\Services\Get\Flow::$flow = null; $home = new \Rpp\Services\Publish\Dominio\Home(); $home->make(); //---flujo galerias----// if ($this->nota->tipo == 'galeria') { \Rpp\Services\Get\Gallery::home(); } elseif ($this->nota->tipo == 'blog') { \Rpp\Services\Get\Flow::autor(); } elseif ($this->nota->tipo == 'brandcontent') { \Rpp\Services\Get\Flow::brandcontent(); } \Rpp\Services\Get\Instantarticle::flow(); \Rpp\Services\Get\Instantarticle::flowupd(); $seccion = new \Rpp\Services\Publish\Dominio\Seccion(); var_dump($this->nota->categoria_slug); foreach ($this->nota->categoria_slug as $seccion_slug) { $seccion_slug = explode("/", $seccion_slug); unset($seccion_slug[0]); if (count($seccion_slug) > 0) { for ($i = count($seccion_slug); $i > 0; $i--) { //var_dump('del:',implode('/',$seccion_slug)); $seccion->set_slug(implode('/', $seccion_slug)); $seccion->make(); unset($seccion_slug[$i]); } } } $tag = new \Rpp\Services\Publish\Dominio\Tag(); foreach ($this->nota->tags as $tag_slug) { $tag->set_slug($tag_slug['slug']); $tag->make(); } $this->viewCache->delete("portada.bodyopen.home"); $this->viewCache->delete("portada.bodycentral.home"); $this->viewCache->delete("portada.bodyclose.home"); ###remaquetado########## $this->viewCache->delete("portada.body.open.home"); $this->viewCache->delete("portada.body.central.home"); $this->viewCache->delete("portada.body.close.home"); if ($this->nota->tipo == 'galeria') { foreach ($this->nota->galeria as $v => $e) { $this->viewCache->delete("nota.header.geleria." . $this->nid . "." . $v); ###remaquetado########## $this->viewCache->delete("nota.header.galeria." . $this->nid . "." . $v); } } $this->viewCache->delete("nota.wrap.group." . $this->nid); ###remaquetado########## $this->viewCache->delete("nota.article.body." . $this->nid); var_dump("terminate......."); }
private function reload_tag($tags) { foreach ($tags as $tag_slug) { \Rpp\Services\Get\Flow::tag($tag_slug['slug']); \Shared\Cache::request()->delete(\Shared\Cache::get_conf()->cache_prefix->tag . 'relatedtag.' . $tag_slug['slug']); } }
public static function setting_cache($tipo) { echo "cache: " . SITESLUG . '_widget_player_' . $tipo; Cache::request()->delete(SITESLUG . '_widget_player_' . $tipo); Cache::request()->save(SITESLUG . '_widget_player_' . $tipo, static::$player, Cache::get_conf()->cache_time->destacados); }
public function make() { $Pattern = $this->patternBuilder->addFields(array("_id"))->addFilter(array("tags.slug" => $this->slug))->build(); Cache::request()->save(Cache::get_conf()->cache_prefix->tag . $this->slug, $Pattern->load(), Cache::get_conf()->cache_time->tag); }
public static function setting_cache($slug, $tipo = 'categoria') { Cache::request()->save(Cache::get_conf()->cache_prefix->categorias_info . $tipo . '.' . $slug, static::${$tipo}[$slug], Cache::get_conf()->cache_time->categorias_info); }
public static function setting_cache($slug) { Cache::request()->save(Cache::get_conf()->cache_prefix->destacados . $slug, static::$destacados[$slug], Cache::get_conf()->cache_time->destacados); }
public static function setting_cache() { Cache::request()->save(SITESLUG . '_widget_alerta', static::$alert, Cache::get_conf()->cache_time->destacados); var_dump(Cache::request()->get(SITESLUG . '_widget_alerta')); }
public static function setting_cache() { $res = Cache::request()->save('widget_socialtv_' . static::$slug, static::$socialtv, Cache::get_conf()->cache_time->destacados); }
public static function setting_cache($pcid) { //Cache::request()->delete(SITESLUG . '_podcast_' . $pcid); Cache::request()->save(SITESLUG . '_podcast_' . $pcid, static::$podcast, Cache::get_conf()->cache_time->destacados); }