Minor cache fixes, init class_session