Opened 10 years ago

Closed 10 years ago

# Cache settings should have default values

Reported by: Owned by: eblot pkropf low GraphvizPlugin trivial

### Description

If the cache manager is enabled, the environment file needs to contain 4 cache values, or the GraphvizPlugin fails to execute.

It would be nice to provide default values for the cache settings.

The following block of code:

    self.cache_max_size  = int(self.config.get('graphviz', 'cache_max_size'))
self.cache_min_size  = int(self.config.get('graphviz', 'cache_min_size'))
self.cache_max_count = int(self.config.get('graphviz', 'cache_max_count'))
self.cache_min_count = int(self.config.get('graphviz', 'cache_min_count'))


fails if one (or more) cache setting is not defined in trac.ini because the int() method cannot coerce an empty string into a valid integer value. It would be nice to add default values to the self.config.get calls.

The graphvizplugin/0.9/Readme.txt file that comes with the package does not mention the cache_min_count setting with is nevertheless mandatory.

### comment:1 Changed 10 years ago by pkropf

• Resolution set to fixed
• Status changed from new to closed

Fixed with changeset:550.