Hacker News new | comments | show | ask | jobs | submit login
Cachier: Persistent, stale-free local/cross-machine caching for Python functions (github.com)
52 points by aviatoAviary 185 days ago | hide | past | web | 7 comments | favorite



Why Mongodb as a cache backend, rather than something like Memcache or Redis?


While we're talking about python caching libraries, I'd like to recommend 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."


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

- edit: spelling


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.


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.


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/

There are other distributed options as well.

https://wiki.python.org/moin/DistributedProgramming


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.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: