Yes, this is a good option for redis. Click the search terms in the Redis list and get the last ten when you want to display them. From time to time, you can remove all but the last ten items from the list to avoid too much value.
Add items to a list like this (assumed to be REDISa Redis join):
REDIS.rpush('searches', 'Xyz')
and get the last ten, like this:
REDIS.lrange('searches', -10, -1)
(as a side effect, Redis will first get the last element of the list, which is probably what you want). Redis lists the work as Ruby arrays; negative indices mean counting from the end.
To close the list of up to ten items, you can use this command:
REDIS.ltrim('searches', -10, -1)
, - , , , . lrange , 10 , .