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

修改cache方法参数类型定义 #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

charmtiger
Copy link
Contributor

先改一下常用的,只能从文档上看出来,最好再细化一下。

先改一下常用的,只能从文档上看出来,最好再细化一下。
@lizheming
Copy link
Contributor

这个 configType 是用户在配置里填的,可以是 file, redis,也可以是其它的,不是固定的值。至于 configOption 的话也是一样,不同的 cache 类型可能需要的参数是不一样的,没办法在 think-cache 层定死,所以感觉这个类型描述在 think-cache 里定义可能不太合适,或许在项目中定义会更合适点?

@charmtiger
Copy link
Contributor Author

我认为大多数使用者不会去自定义cache,也不是说在 think-cache 层定死。定义好常用的类型,再留出扩展插槽,甚至额外给一个方法允许用户自定义会更好。

@charmtiger
Copy link
Contributor Author

我用的时候,没有api的类型提示,总害怕会不会用错,还要去翻一下文档 😂。

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

Successfully merging this pull request may close these issues.

2 participants