| | The HTTP cache for the API now takes a parameter that determines if it
|
| | is created in memory (create_db_in_memory ). This parameter replaces
|
| | the db_path parameter, which previously accepted the special value
|
| | ':memory:' to create the SQLite database in memory. The new
|
| | parameter is more straightforward because caches will only ever be
|
| | required to be created at the default location (for normal operation)
|
| | or in memory (for unit testing). |
| |
|
| | The default API cache path is stored on the APICache class as the
|
| | CACHE_PATH constant, which can be used without instantiating the
|
~ | | class. This allows the cache to be cleared if it exists and has
|
~ | | become corrupt and cannot be loaded. |
| ~ | class. Becuase the HTTP cache for the API is only ever stored in one
|
| ~ | location on disk, it can be cleared (i.e., unlinked) without
|
| + | instantiating the class to determine where it is located on disk. This
|
| + | is important in the case where the cache exists but has become corrupt
|
| + | and cannot be loaded (and so instantiation of the APICache class will
|
| + | fail). |