Permalink
Browse files

This patch fixes a bug in I/O-cache, and re-enables it in the default

configuration file. It also shrinks the default I/O-cache size 10
times. Now, it caches information about the 40 most used files.

git-svn-id: svn://cherokee-project.com/cherokee/trunk@3895 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information...
1 parent 5bccc51 commit 8f34a86e37d04efdd68dd96dc81886fa5a308dec @alobbs alobbs committed Nov 29, 2009
Showing with 7 additions and 5 deletions.
  1. +1 −1 cherokee.conf.sample.pre
  2. +4 −2 cherokee/cache.c
  3. +2 −2 cherokee/iocache.c
View
@@ -34,7 +34,7 @@ vserver!1!logger!error!filename = %localstatedir%/log/cherokee.error
vserver!1!rule!1!match = default
vserver!1!rule!1!handler = common
-vserver!1!rule!1!handler!iocache = 0
+vserver!1!rule!1!handler!iocache = 1
vserver!1!rule!2!match = directory
vserver!1!rule!2!match!directory = /icons
View
@@ -26,8 +26,10 @@
#include "cache.h"
#include "util.h"
-#define ENTRIES "cache"
-#define DEFAULT_MAX_SIZE 100 * 4
+#define ENTRIES "cache"
+
+/* must be multiple of 4 */
+#define DEFAULT_MAX_SIZE 4 * 10
struct cherokee_cache_priv {
#ifdef HAVE_PTHREAD
View
@@ -57,9 +57,9 @@
#endif
#ifdef MAP_FILE
-# define MAP_OPTIONS MAP_SHARED | MAP_FILE
+# define MAP_OPTIONS MAP_PRIVATE | MAP_FILE
#else
-# define MAP_OPTIONS MAP_SHARED
+# define MAP_OPTIONS MAP_PRIVATE
#endif

0 comments on commit 8f34a86

Please sign in to comment.