Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Join Date
    Aug 2006
    Location
    HCMC
    Posts
    270
    Plugin Contributions
    0

    Default How do reduce cache folder size?

    HI ,

    My website have a few GB each month with cache folder.

    Any comment how to deduce them? At this time, my hosting account have 95 Gb data...

    Thanks you !
    Last edited by Kim; 28 Nov 2008 at 01:05 AM.

  2. #2
    Join Date
    Jan 2004
    Posts
    60,393
    Blog Entries
    4
    Plugin Contributions
    144

    Default Re: How do reduce cache folder size?

    What are the filenames in your cache folder?

    Any files ending in .txt or .log can be removed.

    If you have several "query_selects_*******.txt" files, you need to turn off Store Database Queries in Admin->Configuration->Logging
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.



  3. #3
    Join Date
    Aug 2006
    Location
    HCMC
    Posts
    270
    Plugin Contributions
    0

    Default Re: How do reduce cache folder size?

    Quote Originally Posted by DrByte View Post
    What are the filenames in your cache folder?

    Any files ending in .txt or .log can be removed.

    If you have several "query_selects_*******.txt" files, you need to turn off Store Database Queries in Admin->Configuration->Logging

    Thanks you for your tip. I will do that.

  4. #4
    Join Date
    Aug 2006
    Location
    HCMC
    Posts
    270
    Plugin Contributions
    0

    Default Re: How do reduce cache folder size?

    Hi,

    I have some question : When i turn off cache , will my website run slow down or anything will happen ?

    Thanks you !

  5. #5
    Join Date
    Jan 2004
    Posts
    60,393
    Blog Entries
    4
    Plugin Contributions
    144

    Default Re: How do reduce cache folder size?

    Quote Originally Posted by kimsonvu View Post
    When i turn off cache , will my website run slow down or anything will happen ?
    "turn off cache"?
    What do you mean?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.



  6. #6
    Join Date
    Aug 2006
    Location
    HCMC
    Posts
    270
    Plugin Contributions
    0

    Default Re: How do reduce cache folder size?

    Quote Originally Posted by DrByte View Post
    "turn off cache"?
    What do you mean?
    Sorry i have misunderstand about cache. After check, i think i can't turn off them.

    So, i must delete them by hand when folder cache is large , right ? Even i don't Store Page Parse Time and Store Database Queries.

  7. #7
    Join Date
    Jan 2004
    Posts
    60,393
    Blog Entries
    4
    Plugin Contributions
    144

    Default Re: How do reduce cache folder size?

    What version of Zen Cart? What version(s) have you upgraded from?
    What are all your settings in Admin->Configuration->Logging ?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.



  8. #8
    Join Date
    Aug 2006
    Location
    HCMC
    Posts
    270
    Plugin Contributions
    0

    Default Re: How do reduce cache folder size?

    Please check my attached image about that .

    Also, i use 1.38a
    Attached Images Attached Images  

  9. #9
    Join Date
    Jan 2004
    Posts
    60,393
    Blog Entries
    4
    Plugin Contributions
    144

    Default Re: How do reduce cache folder size?

    In /includes/classes/db/mysql/query_factory.php, do your lines 86-100 match the following code?
    Code:
      function Execute($zf_sql, $zf_limit = false, $zf_cache = false, $zf_cachetime=0) {
        // bof: collect database queries
        if (defined('STORE_DB_TRANSACTIONS') && STORE_DB_TRANSACTIONS=='true') {
          global $PHP_SELF, $box_id, $current_page_base;
          if (strtoupper(substr($zf_sql,0,6))=='SELECT' /*&& strstr($zf_sql,'products_id')*/) {
            $f=@fopen(DIR_FS_SQL_CACHE.'/query_selects_' . $current_page_base . '_' . time() . '.txt','a');
            if ($f) {
              fwrite($f,  "\n\n" . 'I AM HERE ' . $current_page_base . /*zen_get_all_get_params() .*/ "\n" . 'sidebox: ' . $box_id . "\n\n" . "Explain \n" . $zf_sql.";\n\n");
              fclose($f);
            }
            unset($f);
          }
        }
        // eof: collect products_id queries
        global $zc_cache;
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.



  10. #10
    Join Date
    Aug 2006
    Location
    HCMC
    Posts
    270
    Plugin Contributions
    0

    Default Re: How do reduce cache folder size?

    That code :

    PHP Code:
      function Execute($zf_sql$zf_limit false$zf_cache false$zf_cachetime=0) {
        
    // bof: collect database queries
        
    if (defined('STORE_DB_TRANSACTIONS') && STORE_DB_TRANSACTIONS=='true') {
          global 
    $PHP_SELF$box_id$current_page_base;
          if (
    strtoupper(substr($zf_sql,0,6))=='SELECT' /*&& strstr($zf_sql,'products_id')*/) {
            
    $f=@fopen(DIR_FS_SQL_CACHE.'/query_selects_' $current_page_base '_' time() . '.txt','a');
            if (
    $f) {
              
    fwrite($f,  "\n\n" 'I AM HERE ' $current_page_base /*zen_get_all_get_params() .*/ "\n" 'sidebox: ' $box_id "\n\n" "Explain \n" $zf_sql.";\n\n");
              
    fclose($f);
            }
            unset(
    $f);
          }
        }
        
    // eof: collect products_id queries
        
    global $zc_cache
    I think it is same!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 4
    Last Post: 13 Sep 2008, 04:40 AM
  2. Replies: 2
    Last Post: 3 Mar 2008, 07:29 PM
  3. AIM debug files in cache folder
    By earmsby in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 31 Dec 2007, 07:43 PM
  4. Moving the cache folder.
    By StevenB in forum General Questions
    Replies: 8
    Last Post: 14 Jul 2007, 01:42 AM
  5. Replies: 1
    Last Post: 26 Jun 2007, 05:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •