-
Notifications
You must be signed in to change notification settings - Fork 15
Configuration
YorickC edited this page Jan 13, 2015
·
11 revisions
Edit the config file: conf/config.ini
.
host
Is the server's base URI. This is the URI on which the TimeGate is deployed. No default value.
Example:
- Suppose TimeGate is running at
http://tg.example.com
andURI-R
refers to an Orignal Resource's URI. - The program will respond to TimeGate requests at
http://tg.example.com/timegate/URI-R
- The program will respond to TimeMap requests at
http://tg.example.com/timemap/link/URI-R
andhttp://tg.example.com/timemap/json/URI-R
if the feature is enabled.
is_vcs
The type of archive affects the best Memento selection algorithm. Default false
.
- When
false
, the history is considered to be snapshots taken at some points in time, thus the best memento is the absolute closest to the requested date. - When
true
, the history the handler returns is considered to be from a version control system. In other words, the history represents every change that was made to the Original Resource and the exact datetimes of the change. In this case, the best Memento for a requested datetime T will be the closest before T.
-
handler_class
(Optional) Python module path to a handler class. This is useful if the handler is composed of several classes or to quickly switch between handlers. If this parameter is not provided, the program will search for handler classes incore.handler
. For example:handler_class = core.handler_examples.wikipedia.WikipediaHandler
-
api_time_out
Time, in seconds, before a request to an API times out when using theHandler.request()
function. Default 6 seconds -
base_uri
(Optional) String that will be prepended to requested URI if missing. This can be used to shorten the request URI and to avoid repeating the base URI that is common to all resources. Default empty- For example, suppose the TimeGate is deployed at
http://tg.example.com
- Suppose every Original Resources
URI-Ri
has the following formathttp://resource.example.com/res/URI-Ri
- Then, Setting
base_uri = http://resource.example.com/res/
will allow short requests such as for examplehttp://tg.example.com/timegate/URI-Ri
instead ofhttp://tg.example.com/timegate/http://resource.example.com/res/URI-Ri
.
- For example, suppose the TimeGate is deployed at
-
use_timemap
Whentrue
, the TimeGate adds TimeMaps links to its (non error) responses. Defaultfalse
Cache parameters:
-
cache_activated
Whentrue
, the cache stores the entire history of an Original Resource from handlers that allows batchget_all_mementos(uri_r)
requests. It can then respond from cache if the value is fresh enough. If a requests contains the headerCache-Control: no-cache
the server will not respond from cache. Whenfalse
the cache files are not created. Defaulttrue
. -
cache_refresh_time
tolerance in seconds, for which it is assumed that a history didn't change. Any TimeGate request for a datetime past this (or any TimeMap request past this) will trigger a refresh of the cached history. Default 86400 seconds (one day). -
cache_directory
Relative path for data files. Do not add any other file to this directory as they could be deleted. Each file represents an entire history of an Original Resource. Defaultcache/
. -
cache_max_values
Maximum number of URI-Rs for which its entire history is stored. This is then the number of files in thecache_directory
. Default 250.