Setting the `ttl` to `0` does not disable the MemoryCache since the
abstraction function `toCache` overwrote `0` with `5` making it
impossible to hit the "// do not cache" branch of `MemoryCache::Set`.
* Add a method to expire cache entries, based on the ttl value
* Add a housekeeping method that will periodically expire cache
entries and also maybe configured to force a GC/SCVG run.
Add support for various cache backends in anticipation of the
merge with master that has an additional redis backend.
The current memory based cache backend is refactored to implement
the new interface.
Merge changes including version 1.11.0 of upstream.
Remove extra lines in RoutesNoExport()
Conflicts:
README.md
* Keep `birdwatcher` in the configuration path
bird/bird.go
* Keep the default order of arguments to birdc in RoutesFiltered() and RoutesNoExport()
birdwatcher.go
* Keep `gorilla/handlers` for HTTP logging
* Change the callback type to update the cache for RunAndParse()
to be a pointer to the Parsed record, which allows updating the
Parsed record before it will be stored inside the cache
* Update all functions that use the meta cache to only create
their own records and also use GetCacheKey() to request the
meta cache from other functions.
* eliminates the need for Clear() -> removed
* Add two new birdc commands:
* PipeRoutesFiltered()
* PipeRoutesFilteredCount()
This allows to determine the key in the cache, where the result of
specific functions are stored, without requiring to know what command
was executed by that function.
Also updated all functions to use GetCacheKey() to store Parsed
records.
The query can be used to determine the exact number of filtered
(not exported) prefixes from a table towards a pipe protocol for
a certain neighbor (if multiple neighbors are connected to
the given table).
* seperate Parsed and Meta cache, so that they may be locked independently
* extend the RunAndParse() function to allow the caller to specify a
callback which will update the Meta cache
* change all methods interacting with the Meta cache to use the
callback for RunAndParse() to update the Meta cache
Removed all high level functionality e.g. endpoints with multiple
invocations of birdc.
Add new endpoints which are required to duplicate the removed
functionality within Alice-LG.
This additionally caches the results after matching regular
expressions and improves performance further.
Credits: Hasan Pekdemir for the original idea.
The commands submitted to birdc contain "'" characters
placed before and after ip-address/prefix and table
name. In normal operation of birdc they are eliminated
by the shell. However when given as arguments to birdc
directly they cause "IP address expected" error in Bird.
Credits: Felix Singer for finding and submitting this bug.
The method parseBgp is now generic enough to parse
all types of protocols.
Added new regular expressions and a more flexible
way of processing route_change statistics that have
subtle differences in each protocol.
For bird and bird6 you may add ttl to the respective config file sections.
See example config in this commit.
This allows to have individual ttls for the cache of bird cli output per daemon.