I prefer to implement this kind of situation (either naked decorator, or decorator with one arg) like this:

```python
def memoized(fn=None, cache=None):
    if fn is not None:
        return memoized(cache=cache)(fn)
    return _create_memoize_decorator(cache)
```

Which would support both:

```python
@memoized
def foo(…): pass
```

And:

```python
@memoized(cache=bar)
def foo(…): pass
````