コード例 #1
0
ファイル: Gallery.php プロジェクト: tresemece/monte
 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});
     }
 }
コード例 #2
0
ファイル: MasVisitadas.php プロジェクト: tresemece/monte
 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);
 }
コード例 #3
0
ファイル: Recomendados.php プロジェクト: tresemece/monte
 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;
 }
コード例 #4
0
ファイル: Tags.php プロジェクト: tresemece/monte
 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);
 }
コード例 #5
0
ファイル: Content.php プロジェクト: tresemece/monte
 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);
 }
コード例 #6
0
ファイル: Seccion.php プロジェクト: tresemece/monte
 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);
 }
コード例 #7
0
ファイル: Visitas.php プロジェクト: tresemece/monte
 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);
 }
コード例 #8
0
ファイル: Noticia.php プロジェクト: tresemece/monte
 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.......");
 }
コード例 #9
0
ファイル: Noticia.php プロジェクト: tresemece/monte
 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']);
     }
 }
コード例 #10
0
ファイル: Player.php プロジェクト: tresemece/monte
 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);
 }
コード例 #11
0
ファイル: Tag.php プロジェクト: tresemece/monte
 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);
 }
コード例 #12
0
ファイル: Categorias.php プロジェクト: tresemece/monte
 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);
 }
コード例 #13
0
ファイル: Destacados.php プロジェクト: tresemece/monte
 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);
 }
コード例 #14
0
ファイル: Alert.php プロジェクト: tresemece/monte
 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'));
 }
コード例 #15
0
ファイル: Socialtv.php プロジェクト: tresemece/monte
 public static function setting_cache()
 {
     $res = Cache::request()->save('widget_socialtv_' . static::$slug, static::$socialtv, Cache::get_conf()->cache_time->destacados);
 }
コード例 #16
0
ファイル: Podcast.php プロジェクト: tresemece/monte
 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);
 }