Jacob Kaplan-Moss

Tag: Backwards Compatibility

Backwards compatibility

Backwards compatibility is pain sometimes:

# We need backwards compatibility with code which spells it this way:
#   def my_view(): pass
#   my_view = cache_page(my_view, 123)
# and this way:
#   my_view = cache_page(123)(my_view)
# and this:
#   my_view = cache_page(my_view, 123, key_prefix="foo")
# and this:
#   my_view = cache_page(123, key_prefix="foo")(my_view)
# and possibly this way (?):
#   my_view = cache_page(123, my_view)