Waqar Khan writes:
> But, is the above way of using dictionary as cache correct? Or is
> there a "deffered" way of doing this? All I want is an inmemory cache
> that is compatible with this async paradigm?
Yes, it is fine to use a single dict as a cache. Twisted is
single-threaded an so only on
Hi all,
Here is async in-memory cache that I've implemented for one of my projects:
https://gist.github.com/IlyaSkriblovsky/5aba53b661acd49b65efeb4ce41a8b52
It properly handles problem #2 described by Maarten. But it doesn't
bother with eviction because it wasn't needed at the time of writing
(be
On Friday, 27 September 2019 05:48:35 CEST Waqar Khan wrote:
> Hi Maarten,
>I think you have hit the problem in the head. I do think this is
> feasible as I have observed that as size of cache increases, things do
> get better which might support your theory.
>
> Is there a simple example you
Hi Maarten,
I think you have hit the problem in the head. I do think this is
feasible as I have observed that as size of cache increases, things do get
better which might support your theory.
Is there a simple example you can add on "put a Deferred for the fetch
operation ". I am really just ge
On Friday, 27 September 2019 04:38:46 CEST Waqar Khan wrote:
> Hi,
> What's a good way to use a simple dictionary as a cache in twisted
> framework?
> Basically, I have this callback chain where I ultimately make a rest
> call (in non-blocking way using treq) to fetch some data. But before
> I ma
Good point.
Thanks for responding.
But, is the above way of using dictionary as cache correct? Or is there a
"deffered" way of doing this?
All I want is an inmemory cache that is compatible with this async
paradigm?
On Thu, Sep 26, 2019 at 10:45 PM Gelin Yan wrote:
> Hi
>
> I don't see any r
Hi
I don't see any reason to use defer.inlineCallbacks in your snippet of
codes.
Regards
gelin yan
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python