thekingofkings / chicago-crime

Crime correlation anaysis
MIT License
11 stars 3 forks source link

web server returns same results for different years #14

Closed thekingofkings closed 8 years ago

thekingofkings commented 8 years ago

the reason is believed as server cache.

Status Code:200 OK (from cache)

The line above is identified in Chrome.

thekingofkings commented 8 years ago

Flask API

Function send_file

cache_timeout – the timeout in seconds for the headers. When None (default), this value is set by get_send_file_max_age() of current_app.

thekingofkings commented 8 years ago

The parameter cache_timeout of function send_file does not work.

Correct solution

    response = make_response( send_file( file ) )
    response.cache_control.max_age = 300
    return response

make_response cache_control object