Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'd rather have a sane API.

    def configure_ring():
        if DEBUG:
            return Ring(backend='debug')
        else:
            return Ring(backend='memcache', ...)

    ring = configure_ring()
    
    @ring.cache(expire=60)
    def get_url(...):
        ...
Tons of other libraries out there that implement this exact pattern.


agree




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: