Any better idea for optimize speed connect to sqllite and use php functions in twig ? #4078
Replies: 1 comment
-
|
? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am new in twig and my language is not english i just used google translate, I use twig and SQLLite to design my site, I have a series of products, each product has a tag field that stores a number of 1 to 10 tags related to that product. There is something like the following, open the product page:
www.aaa.com/tagname1 or www.aaa.com/tagname1/tagname2 or www.aaa.com/etcnames/tagnameN or etctagname1 or tagname2 or tagname3, ... can be the name of one of those tags. With htaccess, I send requests to index.php and there I check the input parameters, now I want to know if the following method is correct or not or do you suggest a better way that has a high speed?
htaccess :
The method I have in mind :
On the index page, I have to get a connection with the bank and check whether the input parameter or parameters are inside the product tag or not, and for each page address that opens, I have to enter a query into the bank, and if the tag is found, the details of that product are as follows. Return an array or json that I can display in a twig template
With this method, I guess the opening speed of the site will slow down, is this method correct? Or can this work be done with better speed and optimization with the help of twig facilities?
Index.php
Functions.php :
Beta Was this translation helpful? Give feedback.
All reactions