#ifndef MBGL_STORAGE_DEFAULT_SQLITE_CACHE_IMPL #define MBGL_STORAGE_DEFAULT_SQLITE_CACHE_IMPL #include #include namespace mapbox { namespace sqlite { class Database; class Statement; } } namespace mbgl { class SQLiteCache::Impl { public: explicit Impl(const std::string &path = ":memory:"); ~Impl(); void get(const Resource&, Callback); void put(const Resource& resource, std::shared_ptr response); void refresh(const Resource& resource, Seconds expires); private: void createDatabase(); void createSchema(); const std::string path; std::unique_ptr<::mapbox::sqlite::Database> db; std::unique_ptr<::mapbox::sqlite::Statement> getStmt; std::unique_ptr<::mapbox::sqlite::Statement> putStmt; std::unique_ptr<::mapbox::sqlite::Statement> refreshStmt; bool schema = false; }; } #endif