why Yii create statePersister Class?

I have readed this:

Comparison among state persister, session and cache is as follows:

session: data persisting within a single user session.


state persister: data persisting through all requests/sessions (e.g. hit counter).


[s]cache: volatile and fast storage. It may be used as storage medium for session or state persister.[/s]

But I still dont understand anymore about it. “e.g. hit counter”, in demos of Yii, I see the way use statePersister, but I dont understand why i shouldn’t use ‘session’ instend for state ‘persister’?

Thanks for reading and answer!

Think about a hit counter … something like "You are the xxxx-th visitor since 2011".

With the session data you can only show something like "This is your xxx-th visit to our site", because the session data is specific to a certain user.