cache counting with pid