ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

0 cache hits, /cache/db_cache empty

August 20, 2007 7:22pm

Subscribe [3]
  • #1 / Aug 20, 2007 7:22pm

    darylh

    26 posts

    I’ve enabled db caching but I’m not getting any hits.

    I then noticed that my /cache/db_cache directory is empty.

    Any ideas why this would be?


    We’re getting ready to launch a site and are benchmarking against 50 concurrent users.  This could hopefully help us get the performance up to scratch.

    (using ee 1.6)

  • #2 / Aug 20, 2007 8:23pm

    Sue Crocker

    26054 posts

    darylh, have you made sure that the folder permissions are set to 777 or the Windows equivalent?

    Just as an aside, which build of EE 1.6 are you on? This has nothing to do with troubleshooting your particular problem, but it may prove helpful.

  • #3 / Aug 20, 2007 8:38pm

    darylh

    26 posts

    I have granted Full Control to Everyone on a windows server 2003 box. for /cache/ and /cache/db_cache/

    Build:  20070622

    I know its slightly dated, but I don’t have access to the download section.  This issue has not been raised in the bug tracker or the changelog from what I can tell.

  • #4 / Aug 20, 2007 8:43pm

    Sue Crocker

    26054 posts

    Can you successfully upload images and the like? Just making sure you have the right privs for the cache by comparing its settings to the one for the /images/uploads folder.

  • #5 / Aug 20, 2007 8:45pm

    Derek Jones

    7561 posts

    It’s more than slightly dated, darylh; there are some very significant modifications and bugfixes since that build, the initial 1.6 release.  I would strongly advise getting download access for that license, or having the license holder download it for you.

    Windows permissions can be tricky, and if I recall, there’s a difference between write and modify, though I’m not a Windows user and couldn’t say for sure.  We cannot provide server support, however.  With the proper environment settings, ExpressionEngine will read and write to its cache on Windows, though, that much we can be sure of.  Do your template caches work with the permissions you are using?

  • #6 / Aug 20, 2007 8:56pm

    darylh

    26 posts

    I’m not sure where the template caching is stored.  I enabled caching on one but could not find where it was stored after a brief look.

    I did notice that db_cache is empty but sql_cache has data in it.  What is the purpose for each? 

    I put a counter in the section of db.mysql.php ~line 260 in the following section of code to log cache hits, and theyre don’t seem to be any…

    if (stristr($sql, 'SELECT'))
                {
                    if (FALSE !== ($cache = $this->get_cache()))
                    {
                        //increase counter here
                        return $cache;
                    }
                }
  • #7 / Aug 20, 2007 9:03pm

    Derek Jones

    7561 posts

    If you enable template caching, and then visit that template, it would appear in ‘page_cache’ in the ‘cache’ folder.  If it’s not able to create that folder on its own, permissions for the ‘cache’ folder are not adequate.  ‘sql_cache’ is for dynamic weblog query caching.  ‘db_cache’ is general database caching.  I’m not sure what you intend to accomplish with the code sample above, particularly since you are only indicating what you are doing with a code comment.  The greater issue, though, is that permissions are not adequate for PHP to be able to create, write, and modify its own files in the ‘cache’ folder.

  • #8 / Aug 20, 2007 9:12pm

    darylh

    26 posts

    Yes, when I enabled template caching, it seems to have been correctly dumped into the page_cache directory.

    I’m getting ready to put the site into a heavy traffic environment.  The current CMS is one we outsourced years ago and we are replacing it with EE.  I’m looking at areas that we can improve performance including query caching, template caching, etc. 

    The code in the comment is below.  I didn’t include it because on the particular machine I’m on, the code isn’t up to date with the dev environment, and its a pain to vpn then rdp to the dev machine.

    $this->cache_hits++

    However, it seems a moot point since there is no cache writing to begin with for some reason.

  • #9 / Aug 20, 2007 9:20pm

    darylh

    26 posts

    Tomorrow morning, I will get access to the download section and install a local up to date install and start from scratch.  I’ll see if I’m able to reproduce this bug and we’ll go from there.

  • #10 / Aug 20, 2007 10:01pm

    Sue Crocker

    26054 posts

    darylh, we’ll be here in the morning. 😊

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases