Re: [Python-ideas] Unified style of cache management API

2019-03-30 Thread Serhiy Storchaka
29.03.19 20:52, Brett Cannon пише: On Thu, Mar 28, 2019 at 10:53 AM Serhiy Storchaka > wrote: 28.03.19 19:45, Brett Cannon пише: > So I would say that a cache-clearing function convention would be a > reasonable starting point. If that turns out to not

Re: [Python-ideas] Unified style of cache management API

2019-03-29 Thread Brett Cannon
On Thu, Mar 28, 2019 at 10:53 AM Serhiy Storchaka wrote: > 28.03.19 19:45, Brett Cannon пише: > > So I would say that a cache-clearing function convention would be a > > reasonable starting point. If that turns out to not be enough for folks > > we can talk about expanding it, but I think we shou

Re: [Python-ideas] Unified style of cache management API

2019-03-28 Thread Serhiy Storchaka
28.03.19 19:45, Brett Cannon пише: So I would say that a cache-clearing function convention would be a reasonable starting point. If that turns out to not be enough for folks we can talk about expanding it, but I think we should start small and grow from there as needed. So what name would pe

Re: [Python-ideas] Unified style of cache management API

2019-03-28 Thread Brett Cannon
On Wed, Mar 27, 2019 at 10:34 AM Serhiy Storchaka wrote: > 27.03.19 15:46, Ma Lin пише: > > re module [1] and struct module [2] have module-level cache for compiled > > stuffs. > > Other third-party modules may also need cache for something. > > > > Do we need an unified cache management API like

Re: [Python-ideas] Unified style of cache management API

2019-03-27 Thread Serhiy Storchaka
27.03.19 15:46, Ma Lin пише: re module [1] and struct module [2] have module-level cache for compiled stuffs. Other third-party modules may also need cache for something. Do we need an unified cache management API like this? I suppose it's not mandatory, but welcome each module to use this API.

Re: [Python-ideas] Unified style of cache management API

2019-03-27 Thread Brett Cannon
On Wed, Mar 27, 2019 at 6:47 AM Ma Lin wrote: > re module [1] and struct module [2] have module-level cache for compiled > stuffs. > Other third-party modules may also need cache for something. > > Do we need an unified cache management API like this? > Need? No. Nice to have? Maybe. > I suppo

[Python-ideas] Unified style of cache management API

2019-03-27 Thread Ma Lin
re module [1] and struct module [2] have module-level cache for compiled stuffs. Other third-party modules may also need cache for something. Do we need an unified cache management API like this? I suppose it's not mandatory, but welcome each module to use this API.   module.cache_get_capacity(