remove unused var
add redis
use redis to prevent duplicate photos