I am using lua script https://github.com/clofresh/mysql-proxy-cache to cache the select query. But there is a problem with the way it is detecting select statement. It is using following code
return query:sub(1,6):lower() == 'select'
This will not work if select query is nested in ()
. Example:
(SELECT * from tbl_name);
Is there a way to remove extra () in mysql proxy ?
or Is there a better way to detect select query?