'Set the cache size based on the config.'

@config.change_filter('storage', 'cache-size')
def _set_cache_size(self):

    size = config.get('storage', 'cache-size')
    if (size is None):
        size = ((1024 * 1024) * 50)
    if (qtutils.version_check('5.7.1') and (not qtutils.version_check('5.9'))):
        size = 0
    self.setMaximumCacheSize(size)
