Turns out i had to return an HttpResponse object. It worked when i changed the code to :
def custom_dec(view_func):
@wraps(view_func, assigned=available_attrs(view_func))
def wrapper(request,filters,*args,**kwargs):
# do some processing on request and filters
cached_func = cache_page(900, view_func)
return cached_func(request,filters,*args,**kwargs) #this returns an HttpResponse object
# the above two line could also be written as cache_page(900, view_func)(request,filters,*args,**kwargs)
return wrapper