A decorator to register a provider on a container.
    For more information see :meth:`Container.add_provider`.

def provider(container, cache, name=None):
    """A decorator to register a provider on a container.
    For more information see :meth:`Container.add_provider`.
    """
    def register(provider):
        container.add_provider(provider, cache, name)
        return provider

    return register