Disable caching if no cache dir given
Šī revīzija ir iekļauta:
vecāks
ec3cbe3f76
revīzija
fe533a5076
@ -37,6 +37,7 @@ SOFTWARE.
|
|||||||
#include "urlprovider.h"
|
#include "urlprovider.h"
|
||||||
#include "requestworker.h"
|
#include "requestworker.h"
|
||||||
#include "cache/fscache.h"
|
#include "cache/fscache.h"
|
||||||
|
#include "cache/nocache.h"
|
||||||
#include "sandbox/sandboxfactory.h"
|
#include "sandbox/sandboxfactory.h"
|
||||||
#include "cli.h"
|
#include "cli.h"
|
||||||
#include "cliconsole.h"
|
#include "cliconsole.h"
|
||||||
@ -68,9 +69,11 @@ static struct option long_options[] = {{"cli", no_argument, 0, 'c'}, {"version",
|
|||||||
|
|
||||||
std::unique_ptr<ICache> createCache(const ConfigVariableResolver &resolver)
|
std::unique_ptr<ICache> createCache(const ConfigVariableResolver &resolver)
|
||||||
{
|
{
|
||||||
|
|
||||||
std::string path = resolver.getConfig("cache_fs_dir");
|
std::string path = resolver.getConfig("cache_fs_dir");
|
||||||
|
if(path == "")
|
||||||
|
{
|
||||||
|
return std::make_unique<NoCache>(path);
|
||||||
|
}
|
||||||
return std::make_unique<FsCache>(path);
|
return std::make_unique<FsCache>(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Notiek ielāde…
x
Atsaukties uz šo jaunā problēmā
Block a user