N
N
Neonoviiwolf2020-05-17 14:51:44
Dart
Neonoviiwolf, 2020-05-17 14:51:44

What is the best way to cache images on the server side?

Good afternoon, I decided to make a simple server on dart, there will be a lot of photos on the server, I thought about how to optimize the load on the server. It is impossible to single out the most common resource requests. Each image exists in 3 versions - "original", "standard" and "icon". Requests for icons are the most frequent, requests for "original" are the rarest. I see the following options:
1) Store the image in 3 options at once, only load icons into memory - it takes up a lot of disk space.
2) Store only the original, reduce and store "icons" and "standard" in memory when starting the server - a long server start, there may not be enough memory on the server.
3) Your version is better.
Zero experience in servers, do not offer another language - the goal is on dart.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2020-05-17
@Neonoviiwolf

1. "a lot of photos" is a flexible concept, call specific numbers
2. Store in 3 options, on disks, and not in some incomprehensible "only load icons into memory - takes up a lot of disk space", if anything, the disk is always more than memory .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question