Jump to content

Search the Community

Showing results for tags 'cache'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development


There are no results to display.

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







Found 49 results

  1. Hello, I'm started to play around with processwire. And I like it! My local dev system is up and runnig. I'm using the template factory with Twig. Anybody who use Twig and ProCache or is it possible to use both modules? Thanks in advance
  2. I developed my own web store platform on ProcessWire. Work like a charm. However, I would like to know what is the best way to cache web store? There is a shopping cart, many languages and previously watched products which need to run without cache but everything else could be cached. Is there a way to use PW's own cache or ProCache for everything else except for certain HTML ID? I have used MarkupCache for categories in some cases. I'm addicted to speed. Everything has to be loaded as fast as possible or even faster. My next step is developing AMP HTML as part of the platform, but that is not helping normal version.
  3. Hello everyone, Usually in many CMS database tables prefixed or suffixed with "cache" can be manually cleared without a problem because the system will populate them on the "next page request". Actually in Processwire I am expecting this behaviour: [On PW 3.x] Manually clear table "caches" in database Go to "client" side (not in the admin panel) All references to my "/site/modules" in my template files does not work : wire("modules")->get(""), $modules->get("") and modules()->get("") PHP error: Fatal error: Uncaught TypeError: Return value... My _init.php file are not able to find the references to my /site/modules/ The client side not working because this PHP fatal error. If I go to the admin panel "Admin -> Modules" and I trigger the action "Check for New Modules" in the top-right corner in the page, it populates the caches table with the required information and them the client side works. It is normal? Or I am doing something wrong ? A solution could be to manually call the script that the button "Check for New Modules" calls, but I want to know if I am doing something wrong here. Thank you in advance guys !
  4. Hi all, Just wondering if its safe to delete the content of the cache table manually within the database?
  5. I'm trying to understand how I could have users log in as "members", provide them with a customized experience, but still serve them cached pages? For example let's say I have 3 roles Guest Member SuperUser And let's say I have a NavBar type component that has a menu. Plus it has "log in!" if guest, or "logged in as Mike Smith" I would want guests to see a cached site with guest-only page access. Members should also see cached pages, but their menu may have access to members-only pages or fields or information. Furthermore they might have a "logged in as Mike Smith" element. SuperUsers can stay uncached. How does one go about creating that cache so that visitors aren't constantly re-creating the menu? Or that when "Sally Baker" logs in, she doesn't see a homepage that is cached for "Mike Smith" with all his elements? Thank you in advance for any replies.
  6. hey guys, is there a way to prevent sections from caching? I am using a frontend login and when the user is logged in they can see extra content compared to the guest. I am using built-in template cache for certain templates and markup-cache for certain parts. Has the ProCache module any options to do that? The emergency solution is maybe turning off template cache and only use markup-cache except this dynamic content. many thanks!
  7. Hey guys, i am using WireCache and template cache. Wondering if there is some kind of web crawler already for processwire which is crawling all your site to warm up the cache? (like in Shopware eCommerce you can warm up your cache with a crawler via cronjob, etc.) Would be a nice feature
  8. I am currently designing a search page for my website. While I am able to get both pagination and fieldtype caching enabled separately, I am not able to implement them together. I followed the following 2 pages - https://processwire.com/api/modules/markup-pager-nav/ https://processwire-recipes.com/recipes/set-up-search-index-with-fieldtypecache/ Is there any way where I can combine these 2 methods for my website? Here is a snippet of my code $q = $sanitizer->text($input->get->q); $q = $sanitizer->selectorValue($q); // Search the cacged fields for our query text. // Limit the results to 50 pages. $selector = "search_cache~=$q, limit=50"; // If user has access to admin pages, lets exclude them from the search results. if($user->isLoggedin()) $selector .= ", has_parent!=2"; // Find pages that match the selector $matches = $pages->find($selector); //Get range of paginated results $start = $matches->getStart() + 1; $end = $matches->getStart() + count($matches); $total = $matches->getTotal(); $content = "<p><b>Showing search results ". $start . " - ". $end . " of ".$total."</b></p>"; // did we find any matches? if($matches->count) { $content .= '<ul>'; foreach($matches as $match){ $content .= '<li>'. $match->parent->title . ': <a href="' . $match->url . '">' . $match->title . '</a></li>'; } $content .= '</ul>'; $content .= $matches->renderPager(array( 'listMarkup' => "<ul class='pagination'>{out}</ul>", 'nextItemLabel' => "Next", 'previousItemLabel' => "Previous", )); } else { // we didn't find any $content = "<strong>Sorry, no results were found.</<strong>"; }
  9. Hi, I use TemplateFile class to render custom files like _layout.tpl (base html layout file), but output I think output isn't cached. Because there is no template added to PW I can't configure template cache I think. How to activate template cache inside of php code temporarily or persistent (for example with a hidden / system template created)? Should be done with code (module install or inside a php file).
  10. Hi there, I'm experiencing a real weird caching issue with Safari (Desktop) and all mobile browsers where it is loading the old version of the site and refusing to reload the website. I don't seem to have the problem with Chrome where a reload did correctly reload the latest version of the website. Has anyone come across this issue before? Things I have tried (and failed) : 1) I've replaced our .htaccess file with the standard one that comes with Processswire 2.8 2) Everything here https://stackoverflow.com/questions/1922910/force-browser-to-clear-cache 3) Deleted everything under /assets/pwpc folder. 4) Deleted all local wesbite data on laptop/mobile and reloaded. Much appreciate if anyone can help me
  11. I'm reusing pages depending on the url of the site and want to cache these pages. For example example.com/blog/1 and example.nl/blog/1 would use the same template but i'm extending the Page to limit the results depending on url. Is there a way that i can append a name to the cache name used to cache this page? It seems it should be easy to hook in the cache rending and change it but i could not find anything helpfull.
  12. Hi, my server or processwire or me cancelled database, that don't exist and my server haven't backup. The error log is: http://www.permaculturaorganica.info/?/ Error: Exception: SQLSTATE[HY000] [1044] Access denied for user 'casbo_RdS'@'%' to database 'casbooko1_po' (in /data/vhosts/permaculturaorganica.info/httpdocs/wire/core/ProcessWire.php line 308) Is this log a log for database not found, it's correct? I was write any articles, but NOT PUBLISH, because the site haven't any grafic. Now I go in /site/assets/cache/ by ftp, but I don't see any file. The address is correct for find the files cache?
  13. I'm caching a big loop (~1000 pages in a pagetable field) and i want to delete it when a new page is added and after that i want to recreate it with php to avoid users waiting for 10 seconds. I figured out the deletion part $path = $config->paths->assets."cache/MarkupCache/cache_name/"; if(file_exists($path)){ CacheFile::removeAll($path, true); } How can i rebuild the cache with php?
  14. Hello, I'm working on a processwire based website in my local webserver (I don't have a lot of experience in processwire). I linked a new CSS file but no update on the website. I read some posts on the forum and decided to add $config->templateCompile = false; to my config.php to see if it was a compiler/cache issue. Then, white screen for all the pages even the admin pages. The only information I get is [HTTP/1.0 500 Internal Server Error 19ms] in the inspector console. I already tried to change back the config.php file or to add $config->debug=true; but nothing in the errors.txt. Any ideas ? Thank you
  15. Speed


    I am having cache issues when working on template style using chrome browser at localhost with local server running. There are time color or size didn't change when I save css and reload chrome page. Sometimes to solve problem, I'd have to hit ctrl + alt + save to clear cache from browser. I've looked up Admin > Setup > Template > Cache Tab and noticed cache was already disabled as default. I have already looked into this article http://www.flamingruby.com/blog/processwire-caching-explained/ But realized it has nothing to with my issues and it got me confused rather its a browser or PW issues, does anyone have similar experience in past and probably found a solution? if so please share some suggestion. Thanks in advance.
  16. Hi, I am writing a custom module that grabs external data via API calls. I would like to store this data as a temporary cache that gets refreshed every X minutes (API calls run in interval) What would be my options in terms of managing this cached data and where to store them? Thanks Rudy
  17. Hey there, I need to temporarily disable the template cache within template context. Since throwing a Wire404Exception effectively holds up the template cache I think it should be possible somehow. Anyways no luck so far ... I basically wan't to handle all kinds of errors myself and return a error message as json within the catch blocks of try & catch. If i just throw the Wire404Exception I'll get html with a json header. (Template is set to return json because otherwise I can't define the header when using template cache) Just throwing a Wire404Exception all the time is no real solution thought. It's dirty and not every error is a 404. Thank you for your help in advance
  18. Hello there I'll start right away: Let's imagine we have a index page: example.com/recipes This index page is also a faceted search accepting GET params for search query, categories, tags, ingredients, ... It would be amazing to be able caching this index page to a certain degree. For example: The GET param categories is somewhat limited. There are only 5 categories in total so it would not add too much overhead. If I could add this GET param to a whitelist and set the total allowed GET params to 1 for example, this would make a great difference in performance. (If we consider there are main navigation links pointing to the faceted search with one category preselected) This would result in cache entries for: example.com/recipes/ example.com/recipes/?categories=cooking example.com/recipes/?categories=bbq While requests like: example.com/recipes/?query=foo example.com/recipes/?categories=cooking&ingredients=cheese ... would not overwork our cache Is this already possible with core modules? (MarkupCache is not really the answer I'm looking for) Is it possible with Pro Cache? Of course since it's an index page: We have pagination to consider as well...
  19. I'm using "quiet" saving in the Webmention module and was wondering if that prevents the page's cache from being cleared. I'm just using the built-in page caching with the option "Clear cache for saved page only (default)" If it matters, the page-save I'm calling is specifying the Webmention Field, rather than just $page->save(); For reference, the code is https://github.com/gRegorLove/ProcessWire-Webmention/blob/master/Webmention/Webmention.module#L840
  20. We have a big selector which we have broken down into 3 chunks to return a list of notes (pages) with repeaters as follows. We also allow the user to filter the results. The problem we have is that the page currently takes nearly 10 seconds to process results. Is there anything we can do to improve the performance of this? I wonder if it would be worth bringing the filters into each of the find()s. I assume that caching here wouldn't work due to querystring parameters? $selector = "template=horse-note"; // Notes with unread comments (date order, most recent first) $notes_with_unread_comments = $pages->find("{$selector}, h_notes_comments.count>0, h_notes_comments.{$session->unread_by}>0, sort=h_notes_last_comment"); //echo 'Notes with unread comments ('.count($notes_with_unread_comments).'):<br />'.$notes_with_unread_comments.'<br /><br />'; // Unread notes (date order, most recent first) $notes_unread = $pages->find("{$selector}, {$session->unread_by}>0, sort=h_notes_last_comment"); //echo 'Notes unread ('.count($notes_unread).'):<br />'.$notes_unread.'<br /><br />'; // Read notes in date order (most recent first) that they were either added or that the last comment was made, whichever is most recent. $notes_other = $pages->find("{$selector}, sort=-h_notes_last_comment"); //echo 'Notes other ('.count($notes_other).'):<br />'.$notes_other.'<br /><br />'; // create notes PageArray $notes_total = new PageArray(); $notes_total->add($notes_other); $notes_total->prepend($notes_unread); $notes_total->prepend($notes_with_unread_comments); // FILTER // sanitize inputs $horse = $sanitizer->text($input->get->horse); $category = $sanitizer->int($input->get->category); $from_date = $sanitizer->text($input->get->from_date); $to_date = $sanitizer->text($input->get->to_date); $comments = $sanitizer->int($input->get->comments); // horse name if($horse) { $selector .= ", parent.h_name%=$horse"; } // note category if($category) { $selector .= ", h_notes_category_id=$category"; } // from date if($from_date) { $selector .= ", h_notes_last_comment>=".strtotime("$from_date 00:00:00"); } // to date if($to_date) { $selector .= ", h_notes_last_comment<=".strtotime("$to_date 23:59:59"); } // comments if($comments) { $selector .= ", h_notes_comments.count>0"; } // apply filter if($selector!='template=horse-note') { $notes_total = $notes_total->find($selector); } // slice PageArray according to pageNum $pageNum = $input->pageNum; $limit = 15; $start = ($pageNum-1)*$limit; $notes = $notes_total->slice($start, $limit);
  21. I'm working on a site that is using the Goodreads API but I'm finding the page very slow to render so would like to speed it up by cacheing the output of the API. The page is made up of several child page 'bundles' each of which displays a selection of books which are chosen with a repeating field containing ISBN numbers. $goodreads_api = 'xxxxxx'; foreach($page->children as $bundle) : foreach($bundle->goodreads as $goodreads) : $xml_string = file_get_contents('https://www.goodreads.com/search/index.xml?key='.$goodreads_api.'&q='.$goodreads->isbn); $book_xml = new SimpleXMLElement($xml_string); foreach ($book_xml->search->results->work as $book) : // content goes here endforeach; endforeach; endforeach; I've looked at the Markup Cache module but when I try cacheing the second foreach loop, I get the correct number of bundles and the correct number of books, but same output for every book. If I cache the first foreach, I get the correct number of bundles, but only one book and again, the same content for each bundle. So is Markup Cache the way to go, and if so, what am I doing wrong, or if not, what else should I be looking at?
  22. Hi, recently I launched a site, where some templates have an enabled cache. Now I made some changes in the css file and noticed, that only if the cache is disabled, the css changes are visible in the frontend. I'm using the AIOM+ module. Is this a normal behavior?
  23. Hi there, I am using the following template file to provide a pdf download, of a pdf stored in a file-field. <?php $file = $page->pdf->filename; header('Content-Type: application/pdf'); header('Content-Disposition: attachment; filename="'.basename($file).'"'); header('Content-Length: ' . filesize($file)); readfile($file); If template caching is disabled, everything working as expected and the following header is sent HTTP/1.1 200 OK Date: Fri, 26 Feb 2016 13:03:27 GMT Server: Apache X-Frame-Options: SAMEORIGIN Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Content-Disposition: attachment; filename="anyfile.pdf" Content-Length: 909233 X-XSS-Protection: 1; mode=block Keep-Alive: timeout=2, max=1000 Connection: Keep-Alive Content-Type: application/pdf Using Template cache the header is overwritten by HTTP/1.1 200 OK Date: Fri, 26 Feb 2016 13:06:11 GMT Server: Apache X-Frame-Options: SAMEORIGIN Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache X-XSS-Protection: 1; mode=block Vary: Accept-Encoding Content-Encoding: gzip Keep-Alive: timeout=2, max=1000 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html; charset=utf-8 Any ideas to prevent this?
  24. I’ve got a site that’s hosted in a shared environment. When I try to use ProcessWire’s caching, content changes in the admin are not reflected on the front-end. Turning off cache, resolves it immediately. Doing some research, I found this message on another thread: According to my hosting company with regards to their set-up: So my question is if there’s anything I can do to get ProcessWire’s caching working in my case. None of the cache options (page-level, site level, etc. ) work in my case.
  25. Hi, I don't know if this is the right section for this but I collected some thoughts and a kind of manual about how to increase the performance of your website under load with nginx and fastcgi_cache. At best, this could be a kind of ProCache for nginx users, as not everyone is using Apache and thus not able to use ProCache on their sites. Additionally, this solution comes with the benefit of server side mobile detection and selective caching. http://svn.matthiashaak.com/website-performance-with-processwire-nginx-and-fastcgi_cache/ Please let me know your thoughts or questions about this. Be aware however, that with this solution you end up serving static pages, so no hooks or PHP functions will be called. I am currently working on a module that eases the cache purging, so kindly be patient if you need this. "Wait, and thou shalt receive"
  • Create New...