A
A
Anton Misyagin2019-10-12 21:38:28
Redis
Anton Misyagin, 2019-10-12 21:38:28

How to log user actions on Redis?

I'm just getting started with redis. The task is to write the last actions of users to the database. I looked at the basic data types and could not understand what I need to solve. What you need:
For each user, have a limited pool of recent activity records. It is necessary that the log clears itself of old entries and cannot fill more than, for example, 100 entries for each of the users, i.e. I try to record the hundred and first action - the first one is deleted, the last one is written to the end, in total again 100 entries. Suggest an idea how to implement? Is it possible to make radishes using regular means or will it be necessary to look at the number of records and remove excesses with scripts?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Mirilaczvili, 2019-10-12
@2ord

RPOPLPUSH

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question