Roxen.git / server / base_server / roxen.pike

version» Context lines:

Roxen.git/server/base_server/roxen.pike:4383:    }   #endif    }       protected void store_data( string id, string data, mapping meta )    {    if(!stringp(data)) return;   #ifdef ARG_CACHE_DEBUG    werror("store %O (%d bytes)\n", id, strlen(data) );   #endif -  if (sizeof(data) > 134217728) { // 134217728 = 2^27 +  int max_data_size_in_mb = [int] query("image_cache_max_entry_size"); +  int max_data_size = max_data_size_in_mb * 1024 * 1024; +  if (sizeof(data) > max_data_size) {    RXML.run_error("Generated image data (%f MB) exceeds max limit of " -  "128 MB.\n", (float) sizeof(data) / 1024 / 1024 ); +  "%d MB.\n", (float) sizeof(data) / 1024 / 1024, +  max_data_size_in_mb);    }    meta_cache_insert( id, meta );    string meta_data = encode_value( meta );   #ifdef ARG_CACHE_DEBUG    werror("Replacing entry for %O\n", id );   #endif    if (sizeof(data) <= 8*1024*1024) {    // Should fit in the 16 MB query limit without problem.    // Albeit it might trigger a slow query entry for large    // entries.