Revert "shape.input - add 'update-cache' optional parameter (default:true)" -- no much use as OS seems to apply it's own caching, doh ..
This reverts commit f65c799475
.
This commit is contained in:
parent
eb1a23d6e4
commit
6a9240f3d4
7 changed files with 10 additions and 12 deletions
|
@ -49,7 +49,7 @@ dbf_file::dbf_file()
|
|||
record_length_(0),
|
||||
record_(0) {}
|
||||
|
||||
dbf_file::dbf_file(std::string const& file_name, bool update_cache)
|
||||
dbf_file::dbf_file(std::string const& file_name)
|
||||
:num_records_(0),
|
||||
num_fields_(0),
|
||||
record_length_(0),
|
||||
|
@ -64,7 +64,7 @@ dbf_file::dbf_file(std::string const& file_name, bool update_cache)
|
|||
{
|
||||
|
||||
#if defined(MAPNIK_MEMORY_MAPPED_FILE)
|
||||
boost::optional<mapnik::mapped_region_ptr> memory = mapnik::mapped_memory_cache::instance().find(file_name, update_cache);
|
||||
boost::optional<mapnik::mapped_region_ptr> memory = mapnik::mapped_memory_cache::instance().find(file_name,true);
|
||||
if (memory)
|
||||
{
|
||||
mapped_region_ = *memory;
|
||||
|
|
|
@ -69,7 +69,7 @@ private:
|
|||
char* record_;
|
||||
public:
|
||||
dbf_file();
|
||||
dbf_file(std::string const& file_name, bool update_cache = true);
|
||||
dbf_file(std::string const& file_name);
|
||||
~dbf_file();
|
||||
bool is_open();
|
||||
int num_records() const;
|
||||
|
|
|
@ -64,7 +64,6 @@ shape_datasource::shape_datasource(parameters const& params)
|
|||
file_length_(0),
|
||||
indexed_(false),
|
||||
row_limit_(*params.get<mapnik::value_integer>("row_limit",0)),
|
||||
update_cache_(*params.get<mapnik::value_bool>("update-cache", true)),
|
||||
desc_(shape_datasource::name(), *params.get<std::string>("encoding","utf-8"))
|
||||
{
|
||||
#ifdef MAPNIK_STATS
|
||||
|
|
|
@ -72,7 +72,6 @@ private:
|
|||
box2d<double> extent_;
|
||||
bool indexed_;
|
||||
const int row_limit_;
|
||||
const bool update_cache_;
|
||||
layer_descriptor desc_;
|
||||
};
|
||||
|
||||
|
|
|
@ -35,11 +35,11 @@ const std::string shape_io::SHX = ".shx";
|
|||
const std::string shape_io::DBF = ".dbf";
|
||||
const std::string shape_io::INDEX = ".index";
|
||||
|
||||
shape_io::shape_io(std::string const& shape_name, bool open_index, bool update_cache)
|
||||
shape_io::shape_io(std::string const& shape_name, bool open_index)
|
||||
: type_(shape_null),
|
||||
shp_(shape_name + SHP, update_cache),
|
||||
shx_(shape_name + SHX, update_cache),
|
||||
dbf_(shape_name + DBF, update_cache),
|
||||
shp_(shape_name + SHP),
|
||||
shx_(shape_name + SHX),
|
||||
dbf_(shape_name + DBF),
|
||||
reclength_(0),
|
||||
id_(0)
|
||||
{
|
||||
|
|
|
@ -57,7 +57,7 @@ public:
|
|||
shape_multipatch = 31
|
||||
};
|
||||
|
||||
shape_io(std::string const& shape_name, bool open_index = true, bool update_cache = true);
|
||||
shape_io(std::string const& shape_name, bool open_index=true);
|
||||
~shape_io();
|
||||
|
||||
shape_file& shp();
|
||||
|
|
|
@ -159,7 +159,7 @@ public:
|
|||
|
||||
shape_file() {}
|
||||
|
||||
shape_file(std::string const& file_name, bool update_cache = true) :
|
||||
shape_file(std::string const& file_name) :
|
||||
#if defined(MAPNIK_MEMORY_MAPPED_FILE)
|
||||
file_()
|
||||
#elif defined (_WINDOWS)
|
||||
|
@ -170,7 +170,7 @@ public:
|
|||
{
|
||||
#if defined(MAPNIK_MEMORY_MAPPED_FILE)
|
||||
boost::optional<mapnik::mapped_region_ptr> memory =
|
||||
mapnik::mapped_memory_cache::instance().find(file_name, update_cache);
|
||||
mapnik::mapped_memory_cache::instance().find(file_name,true);
|
||||
|
||||
if (memory)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue