fix flush_cache for generic package resource