added $table_name to clear cache function