Skip to content

Commit

Permalink
fix cache bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenghaoMou committed Jun 6, 2021
1 parent 6ecf137 commit a79f55d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "touchbar-lyric"
version = "0.6.4"
version = "0.6.5"
description = "Display lyrics on your touchbar with BTT"
authors = ["Chenghao Mou <mouchenghao@gmail.com>"]
license = "MIT"
Expand Down
8 changes: 6 additions & 2 deletions touchbar_lyric/service/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# @Date : 2021-03-14 15:54:40
# @Author : Chenghao Mou (mouchenghao@gmail.com)


import os
import logging.config
from typing import List

Expand All @@ -20,8 +20,12 @@
from touchbar_lyric.service.qq import qq_music_search
from diskcache import FanoutCache

CACHE = os.path.join(os.path.expanduser("~"), ".cache")

if not os.path.exists(CACHE):
os.mkdir(CACHE)

cache = FanoutCache(".cache", timeout=2)
cache = FanoutCache(CACHE, timeout=2)


@cache.memoize(typed=True, expire=None, tag="lyric")
Expand Down

0 comments on commit a79f55d

Please sign in to comment.