Returning values to the local cache

I am currently working on a program that is meant for the client to return the number of mouse clicks in the local cache as a http response. When the right mouse is clicked on the webpage, it should increment that value by one and when the left mouse is clicked it should also increment that value by one. I’m having difficulty returning those values.

This is my full HTML code:

This is my CACHE function:

This is my database and web server commands: