-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
キャッシュを出力して差分があるかどうか判定する #106
Milestone
Comments
assets のファイル名は |
テンプレートだけ変わったときに対応できていない 追記: これ気のせいじゃないか?中身の HTML が変わったらハッシュ変わるのでテンプレート変わっても大丈夫そう |
キャッシュを無視して強制的に上書きする機能がほしい |
#109 でオプション追加した。 対応したので close |
ファイルの存在性くらいチェックするべきな気がしてきた (ファイルが存在しないのに保存しなかったらやばくない?) |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
概要
PDF を出力すると差分が必ず出てしまうが、これが必要な差分なのか否かを判断する手段がない
何かを出力する際にはキャッシュも出力するようにし、差分があるときだけ更新するようにしたい
実装
ss-out/cache.json
か何かで持つcontents
キーに保存しておく。hashlib
が利用できるdict
を作る。これがcache_dict[dict]
と同一であれば PDF を作らずに処理を終了する。そうでなければcache_dict[dict]
を更新して PDF を作る。The text was updated successfully, but these errors were encountered: