#include "config.h"
#include <stdio.h>
#include <pthread.h>
#include <iostream>
#include <sstream>
#include <algorithm>
#include <iterator>
#include <set>
#include "Error.h"
#include "InternalErr.h"
#include "ResponseTooBigErr.h"
#include "SignalHandler.h"
#include "HTTPCacheInterruptHandler.h"
#include "HTTPCache.h"
#include "util_mit.h"
#include "debug.h"
Include dependency graph for HTTPCache.cc:
Go to the source code of this file.
Defines | |
#define | CACHE_EMPTY_ETAG "@cache@" |
#define | CACHE_FOLDER_PCT 10 |
#define | CACHE_GC_PCT 10 |
#define | CACHE_INDEX ".index" |
#define | CACHE_LOC "/tmp/" |
#define | CACHE_LOCK ".lock" |
#define | CACHE_META ".meta" |
#define | CACHE_ROOT "dods-cache/" |
#define | CACHE_TOTAL_SIZE 20 |
#define | DESTROY(m) pthread_mutex_destroy((m)) |
#define | DIR_SEPARATOR_CHAR '/' |
#define | DIR_SEPARATOR_STR "/" |
#define | DUMP_FREQUENCY 10 |
#define | INIT(m) pthread_mutex_init((m), 0) |
#define | LM_EXPIRATION(t) (min((MAX_LM_EXPIRATION), static_cast<int>((t) / 10))) |
#define | LOCK(m) pthread_mutex_lock((m)) |
#define | MAX_CACHE_ENTRY_SIZE 3 |
#define | MAX_LM_EXPIRATION 48*3600 |
#define | MEGA 0x100000L |
#define | MIN_CACHE_TOTAL_SIZE 5 |
#define | MKDIR(a, b) mkdir((a), (b)) |
#define | MKSTEMP(a) mkstemp((a)) |
#define | NO_LM_EXPIRATION 24*3600 |
#define | REMOVE(a) remove((a)) |
#define | TRYLOCK(m) pthread_mutex_trylock((m)) |
#define | UNLOCK(m) pthread_mutex_unlock((m)) |
#define CACHE_EMPTY_ETAG "@cache@" |
Definition at line 94 of file HTTPCache.cc.
#define CACHE_FOLDER_PCT 10 |
#define CACHE_GC_PCT 10 |
#define CACHE_INDEX ".index" |
Definition at line 91 of file HTTPCache.cc.
#define CACHE_LOC "/tmp/" |
Definition at line 88 of file HTTPCache.cc.
#define CACHE_LOCK ".lock" |
Definition at line 92 of file HTTPCache.cc.
#define CACHE_META ".meta" |
#define CACHE_ROOT "dods-cache/" |
Definition at line 89 of file HTTPCache.cc.
#define CACHE_TOTAL_SIZE 20 |
Definition at line 108 of file HTTPCache.cc.
#define DESTROY | ( | m | ) | pthread_mutex_destroy((m)) |
Definition at line 65 of file HTTPCache.cc.
#define DIR_SEPARATOR_CHAR '/' |
Definition at line 80 of file HTTPCache.cc.
#define DIR_SEPARATOR_STR "/" |
Definition at line 81 of file HTTPCache.cc.
#define DUMP_FREQUENCY 10 |
Definition at line 105 of file HTTPCache.cc.
#define INIT | ( | m | ) | pthread_mutex_init((m), 0) |
Definition at line 64 of file HTTPCache.cc.
#define LM_EXPIRATION | ( | t | ) | (min((MAX_LM_EXPIRATION), static_cast<int>((t) / 10))) |
Definition at line 102 of file HTTPCache.cc.
#define LOCK | ( | m | ) | pthread_mutex_lock((m)) |
Definition at line 61 of file HTTPCache.cc.
Referenced by HTTPCache::get_cache_root(), HTTPCache::set_default_expiration(), and HTTPCache::set_expire_ignored().
#define MAX_CACHE_ENTRY_SIZE 3 |
Definition at line 112 of file HTTPCache.cc.
#define MAX_LM_EXPIRATION 48*3600 |
Definition at line 97 of file HTTPCache.cc.
#define MEGA 0x100000L |
Definition at line 107 of file HTTPCache.cc.
Referenced by HTTPCache::set_expire_ignored(), and HTTPCache::set_max_size().
#define MIN_CACHE_TOTAL_SIZE 5 |
#define MKDIR | ( | a, | |||
b | ) | mkdir((a), (b)) |
Definition at line 77 of file HTTPCache.cc.
#define MKSTEMP | ( | a | ) | mkstemp((a)) |
Definition at line 79 of file HTTPCache.cc.
#define NO_LM_EXPIRATION 24*3600 |
Definition at line 96 of file HTTPCache.cc.
#define REMOVE | ( | a | ) | remove((a)) |
Definition at line 78 of file HTTPCache.cc.
#define TRYLOCK | ( | m | ) | pthread_mutex_trylock((m)) |
Definition at line 62 of file HTTPCache.cc.
#define UNLOCK | ( | m | ) | pthread_mutex_unlock((m)) |
Definition at line 63 of file HTTPCache.cc.