
Cachier: Persistent, stale-free local/cross-machine caching for Python functions - aviatoAviary
https://github.com/shaypal5/cachier
======
anentropic
Why Mongodb as a cache backend, rather than something like Memcache or Redis?

------
lumpypua
While we're talking about python caching libraries, I'd like to recommend
[https://github.com/codeinthehole/django-
cacheback](https://github.com/codeinthehole/django-cacheback)

"It's an extensible caching library that refreshes stale cache items
asynchronously using a Celery or rq task. The key idea being that it's better
to serve a stale item (and populate the cache asynchronously) than block the
response process in order to populate the cache synchronously."

------
beernutz
What does "stale-free" mean in this context? That term appears to be a little
hard to google.

\- edit: spelling

------
emmelaich
Something like this could be the basis of an improvement in Ansible.

At a guesstimate 70% of Ansible tasks are common code yet are transferred to
the controlled machine every single time.

~~~
616c
I was reading about PowerShell remoting and discovered one of the benefits of
remoting is what you want out of something like this applied to Ansible: code
blocks modules and other data can be handled across machines implicitly or
explicitly.

I think such things abstracted out to a Python C&C system would be amazing
myself.

~~~
emmelaich
Well Pyro has been around for a long time; I haven't looked at it closely so I
don't know why it doesn't seem to have a lot of mindshare. Certainly sounds
great.

[http://pythonhosted.org/Pyro4/](http://pythonhosted.org/Pyro4/)

There are other distributed options as well.

[https://wiki.python.org/moin/DistributedProgramming](https://wiki.python.org/moin/DistributedProgramming)

------
vosper
I can't see the cross-machine part being useful unless you are already running
a MongoDB cluster, because that's a pretty big dependency.

