Skip to content
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

コントローラ定義、ロジック定義のキャッシュ機構の追加 #332

Closed
simdy opened this issue May 30, 2014 · 2 comments
Closed
Assignees
Milestone

Comments

@simdy
Copy link
Member

simdy commented May 30, 2014

コントローラやロジックの初期化を高速化するため、コントローラの定義の解析結果をキャッシュする仕組みを導入する。
これに伴い、キャッシュをクリアする仕組みを整備する。

@simdy simdy added this to the v1.1.11 milestone May 30, 2014
@simdy
Copy link
Member Author

simdy commented May 30, 2014

キャッシュ機構は h5.core.definitionCacheManager で公開する。
公開するAPIはキャッシュを削除する definitionCacheManager.clear(name) と .clearAll() の2つ。

なお、キャッシュは h5.core.controller()を呼ぶと自動的に作成・内部保存される。
キャッシュは__nameの値をキーにして保存する。
原則として、hifiveでは__nameが同一のものは同一のクラスとみなすので、clear()やclearAll()はほとんどの場合は使われないはずである。
ただし、テスト等のために使ったり、何らかの事情で__nameが同一でありながら別のオブジェクトを後からコントローラ化したい場合のために、キャッシュクリアの機能を付ける。

@fukudayasuo
Copy link

aebe664 57924c1
h5.core.definitionCacheManagerにclear(name)とclearAll()を公開しました。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants