Hello,
I checked your middleware and saw that with every request a db operation is being executed. I would suggest to use the session to store the last stored hash to check if it already has been recorded. This way the amount of times that the db is queried will be reduced.
Flow could be: Check session -> Check if entry exists on db -> Create db entry
What do you think?
Hello,
I checked your middleware and saw that with every request a db operation is being executed. I would suggest to use the session to store the last stored hash to check if it already has been recorded. This way the amount of times that the db is queried will be reduced.
Flow could be: Check session -> Check if entry exists on db -> Create db entry
What do you think?