Fix compiler error for struct list_elem *e not being declared
Get rid of static variable cache_size and use list size