Jump to content

felix

Members
  • Posts

    214
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by felix

  1. Hey folks, I'm trying to cache a lot of event & news entrys that get loaded on several pages. There are two conditions that - when met - require the cache to be invalidated: - A page with the Template "news-detail" is saved - The Cachefile is older than "Today at midnight" The first condition is easy (see code below). What about the second? Is there a way to combine both conditions (template change and caching time) using the cache api? Will I have to use cron/lazycron to purge the cache every 24hrs? private function getCachedNews($parentId, \PageArray $filter = null) { $template = wire('templates')->get(self::NEWS_TEMPLATE); $cache = wire('cache'); $addedFilters = ''; if(!is_null($filter)) $addedFilters = '_' . $filter->implode('', 'name'); $newsSelector = 'news_' . $parentId . $addedFilters; $news = $cache->get($newsSelector, $template, function($pages) { // here be newslogic dragons [...] return $retVal; }); return $news; }
  2. RT @webrocker: How my grunt/sass/npm project set up looks to me three months after launch… https://t.co/kiBL6fXatg

  3. RT @codepo8: OMG!!!! Impossible Mission (C64) as a canvas in-browser version!!! https://t.co/oJtTM6wjKg

  4. RT @innocent: Horror in the modern age - less than 10% phone battery. https://t.co/GFAfugwiA2

  5. RT @LandOfWordpress: Cool ... @Processwire vs #Drupal, #Wordpress and Symphony discussed on reddit/r/webdev -> https://t.co/UiUlrXejjP

  6. RT @literally_nice: "Ist das hier das Seminar für unterschwellige Beleidigungen?""Ja, nimm dir zwei Stühle und setz dich zu uns."

  7. Current Status: mit #vuejs rumdaddeln /cc @EX3MP

  8. RT @processwire: New post: ProcessWire 2.6.20 + surprise: ProcessWire 3.0 alpha 1, and lots of discussion about namespaces– https://t.co/1m…

  9. RT @iamdevloper: > right click link> open in new tab* looks at address bar *> javascript:void(0)ಠ_ಠ

  10. RT @HeathC: “Hi, I’d like to add you to my professional network on LinkedIn” http://t.co/c5w51rqkSf

  11. RT @smashingmag: So what if you could... redesign a flag? A New Zealand Flag project. http://t.co/IGqGhSxH0q

  12. RT @JoeBlubaugh: Accelerated Mobile Pages is a better way to solve the slow web problems that Instant Articles is trying to solve: https://…

  13. Google today announced it's competitor to Facebooks "Instant Articles": "AMP"(Accelerared Mobile Pages)HTML. Based on open source technologies (Basically it's a set of Web Components and a JS-Framework that loads and caches resources) it seems very promising. As far as I understand media is cached, served and proxied by google (and some tech partners). Btw: processwire as a system could benefit from/partner with it, too: https://www.ampproject.org/faq/#accelerated-mobile-pages-9 I'm really looking forward to playing around with it. Anyone else already fired up his editor and started fiddling around?
  14. RT @carlfish: Volkswagen extension to PHPUnit detects when your tests are being run in a CI server, and makes them pass. https://t.co/Wu1KU…

  15. RT @lukew: designers, welcome to your new canvas. http://t.co/9nF0RYszA6

  16. RT @processwire: New post: ProcessWire 2.6.19 continues on path towards 2.7, plus detailed overview of optional core modules– https://t.co/…

  17. RT @coates: In the past, instead of creating closed (but profitable) silos, we engineer-types created open, free tools. There’d be no Web w…

  18. No need for ORM. Processwire's way is to build your Model using Pages and Templates.
  19. RT @wfaler: The three most common Agile practices are: calling things "Agile", calling things "Scrum", and paying for a JIRA license.

  20. RT @Fabiozzo: ES IST HERBST. SCHNELL LAUBBLÄTTER INSTAGRAMEN.

  21. Okay. I'll have a look into those modules. P.S.: Don't expect any PRs in the next days - it will take a while as I'm pretty limited in time, too (I'll do this in my spare time when my family is asleep )
  22. Not exactly. I've build something like this already (textformatteroembed). I'm talking about a dedicated video button inside ckeditor that can also be used for self hosted videos.
  23. RT @mindwarp5: Der beste vierbeinige Freund des Menschen ist sein Bett.

×
×
  • Create New...