Skip to main content

FileCache

Small high-performance file caching tool for python. Sub table and sub database.

Can do what?

You can set cache file easily, just focus on your business.

How to use?

1. import

pip install demjson
pip install LogColorHelper-jingle1267
pip install FileCache-jingle1267
from FileCache import FileCache

2. USE

FileCache.easy_cache('test_cache_file.json', 'cache_key', test_hit_callback, test_miss_callback, a=1, b='c')

各个参数的含义:

# 快速缓存便利工具
# file_name: 缓存文件名称
# cache_key:缓存字段名
# hit_callback:命中缓存需要执行的回调
# miss_callback:没有命中缓存需要执行的回调
# kwargs:回调需要传的参数
def easy_cache(file_name, cache_key, hit_callback, miss_callback, **kwargs)

3. Config(Optional)

3.1 Set cache folder path
FileCache.CACHE_DIR = './tests'
3.2 Set cache file sections
FileCache.CACHE_FILE_SECTION_COUNT = 2

Better performance can be achieved by properly setting sections count.

Release files for FileCache-jingle1267 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for FileCache-jingle1267 0.1.0
File Size Uploaded
FileCache-jingle1267-0.1.0.tar.gz 4.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for FileCache-jingle1267 0.1.0
File Interpreter ABI Platform
FileCache_jingle1267-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.4 kB

Release files / FileCache-jingle1267-0.1.0.tar.gz

Download URL FileCache-jingle1267-0.1.0.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
637e9b1612e2c047a3671120fff400e7916b6888db43bde87e1dc53b661f7e3c
BLAKE2b-256 checksum
How to use checksums
3bc2ca796c560155c07975319a45012e29d62d12f9e31eb56e67db9870548b85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10

Release files / FileCache_jingle1267-0.1.0-py3-none-any.whl

Download URL FileCache_jingle1267-0.1.0-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bb13f32b3f84da64275c76692d8e2f633f0ed21bdc061137502770bd011aef38
BLAKE2b-256 checksum
How to use checksums
8da75ed83308b75452c2d7a3d1799e1a6c9fae3f198e6782c96f2e0894a8639b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page