Removing cache enabled flag from most confs
This commit is contained in:
parent
35d9da1178
commit
631d707a35
@ -53,9 +53,6 @@ swift_store_create_container_on_put = False
|
||||
|
||||
# ============ Image Cache Options ========================
|
||||
|
||||
# Whether to enable the caching of image data
|
||||
image_cache_enabled = False
|
||||
|
||||
# Directory that the Image Cache writes data to
|
||||
# Make sure this is also set in glance-pruner.conf
|
||||
image_cache_datadir = /var/lib/glance/image-cache/
|
||||
|
@ -7,9 +7,6 @@ debug = False
|
||||
|
||||
log_file = /var/log/glance/prefetcher.log
|
||||
|
||||
# Whether to enable the caching of image data
|
||||
image_cache_enabled = False
|
||||
|
||||
# Directory that the Image Cache writes data to
|
||||
# Make sure this is also set in glance-api.conf
|
||||
image_cache_datadir = /var/lib/glance/image-cache/
|
||||
|
@ -7,9 +7,6 @@ debug = False
|
||||
|
||||
log_file = /var/log/glance/pruner.log
|
||||
|
||||
# Whether to enable the caching of image data
|
||||
image_cache_enabled = False
|
||||
|
||||
image_cache_max_size_bytes = 1073741824
|
||||
|
||||
# Percentage of the cache that should be freed (in addition to the overage)
|
||||
|
@ -7,9 +7,6 @@ debug = False
|
||||
|
||||
log_file = /var/log/glance/reaper.log
|
||||
|
||||
# Whether to enable the caching of image data
|
||||
image_cache_enabled = False
|
||||
|
||||
# Directory that the Image Cache writes data to
|
||||
# Make sure this is also set in glance-api.conf
|
||||
image_cache_datadir = /var/lib/glance/image-cache/
|
||||
|
@ -17,6 +17,7 @@
|
||||
import webob.exc
|
||||
|
||||
from glance import registry
|
||||
from glance.common import exception
|
||||
|
||||
|
||||
class BaseController(object):
|
||||
|
@ -98,8 +98,7 @@ class ImageCache(object):
|
||||
|
||||
@property
|
||||
def enabled(self):
|
||||
return config.get_option(
|
||||
self.options, 'image_cache_enabled', type='bool', default=False)
|
||||
return self.options.get('image_cache_enabled', False)
|
||||
|
||||
@property
|
||||
def path(self):
|
||||
|
@ -47,11 +47,6 @@ class Prefetcher(object):
|
||||
cache_file.write(chunk)
|
||||
|
||||
def run(self):
|
||||
if not self.cache.enabled:
|
||||
logger.debug(
|
||||
"Image caching is not enabled, going back to sleep...")
|
||||
return
|
||||
|
||||
if self.cache.is_currently_prefetching_any_images():
|
||||
logger.debug("Currently prefetching, going back to sleep...")
|
||||
return
|
||||
|
@ -48,11 +48,6 @@ class Pruner(object):
|
||||
type='float', default=0.05)
|
||||
|
||||
def run(self):
|
||||
if not self.cache.enabled:
|
||||
logger.debug(
|
||||
"Image caching is not enabled, going back to sleep...")
|
||||
return
|
||||
|
||||
self.prune_cache()
|
||||
|
||||
def prune_cache(self):
|
||||
|
@ -32,13 +32,8 @@ class Reaper(object):
|
||||
self.cache = ImageCache(options)
|
||||
|
||||
def run(self):
|
||||
if not self.cache.enabled:
|
||||
logger.debug(
|
||||
"Image caching is not enabled, going back to sleep...")
|
||||
return
|
||||
|
||||
invalid_grace = int(self.options.get(
|
||||
'image_cache_invalid_entry_grace_period',
|
||||
'image_cache_invalid_entry_grace_period',
|
||||
3600))
|
||||
self.cache.reap_invalid(grace=invalid_grace)
|
||||
self.cache.reap_stalled()
|
||||
|
Loading…
x
Reference in New Issue
Block a user