Remove old caching code

Not deleting debug_cache_stats as we'll soon re-add stuff there.
This commit is contained in:
Florian Bruhin 2017-06-16 14:34:51 +02:00
parent 46d0fee11b
commit b5eac744b5
3 changed files with 1 additions and 10 deletions

View File

@ -147,9 +147,6 @@ def init(args, crash_handler):
objreg.register('event-filter', event_filter)
log.init.debug("Connecting signals...")
config_obj = objreg.get('config')
# FIXME:conf
# config_obj.style_changed.connect(style.get_stylesheet.cache_clear)
qApp.focusChanged.connect(on_focus_changed)
_process_args(args)

View File

@ -27,7 +27,6 @@ from qutebrowser.config import config
from qutebrowser.utils import log, jinja
@functools.lru_cache(maxsize=16)
def get_stylesheet(template_str):
"""Format a stylesheet based on a template.
@ -59,6 +58,5 @@ def set_register_stylesheet(obj):
def _update_stylesheet(obj):
"""Update the stylesheet for obj."""
get_stylesheet.cache_clear()
if not sip.isdeleted(obj):
obj.setStyleSheet(get_stylesheet(obj.STYLESHEET))

View File

@ -168,11 +168,7 @@ def debug_all_objects():
@cmdutils.register(debug=True)
def debug_cache_stats():
"""Print LRU cache stats."""
# FIXME:conf
config_info = objreg.get('config').get.cache_info()
style_info = style.get_stylesheet.cache_info()
log.misc.debug('config: {}'.format(config_info))
log.misc.debug('style: {}'.format(style_info))
pass
@cmdutils.register(debug=True)