How can I store user's search history?

How can I store user’s search history?

After entering search strings, add them to the list. If there are more entries in the list, for example, 10 entries, then shift the list one position to the left and add a new item to the end. So the history list will not exceed 10 entries. To save the list between runs of the application, save it in a variable of type Store.