Branch: Tag:

2016-04-07

2016-04-07 12:24:25 by Jonas Walldén <jonasw@roxen.com>

Don't peek directly into DataCache objects now that we have a method that
returns the relevant data. This will help later on if we wish to evolve the
cache behavior for e.g. auth vs. non-auth entries.

340:       class DataCache    { -  int current_size, max_size, max_file_size; -  int hits, misses; +     void flush();    void expire_entry(string url, RequestID id);    void set(string url, string data, mapping meta, int expire, RequestID id);
3235: Inside #if defined(RAM_CACHE)
   if (!misc->etag && file->len &&    (file->data || file->file) &&    file->error == 200 && (<"HEAD", "GET">)[method] && -  (file->len < conf->datacache->max_file_size)) { +  (file->len < conf->datacache->get_cache_stats()->max_file_size)) {    string data = "";    if (file->file) {    data = file->file->read(file->len);