Y291bnRpbmcgIyBvZiB2aWV3cywgY2FsY3VsYXRpbmcgbW9zdC9sZWFzdCB2aWV3ZWQ=

I'm seeking for a design pattern or advice or directions.

I need to count views/downloads of a set of resources, let them to be identified by their respective URLs.
This is not a big problem. I also need to keep a list of viewed/downloaded resources in the last X days. This list needs to be updated every now and then to reflect real last X days of usage. So resources that were requested prior to X days get evicted from it.
So it's sort of a black box, you feed messages (download request) in and it gives you that list of URLs with counters on the other end.

How would you go about designing it?