How to implement Redis caching in osclass
« on: April 18, 2023, 02:42:18 PM »
Currently i am using memecache, but facing some speed issue and longer SQL queries issues in my classified. And now i want to implement the redis cache into osclass website maybe it will help a lot in reducing the speed and load times, also it will improve SQL performance as well.

*

MB Themes

Re: How to implement Redis caching in osclass
« Reply #1 on: April 18, 2023, 04:17:14 PM »
There should be support for that in 8.1.1 but I think it was not well tested and could not be debugged for possible issues.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

Re: How to implement Redis caching in osclass
« Reply #2 on: April 18, 2023, 09:32:30 PM »
i am getting this error when I enable redis caching, and also HTTP ERROR 500 many time while loading any page.
 my php 8.1 and osclass 8.1.1


Code: [Select]
[19-Apr-2023 00:26:19 Indian/Maldives] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /home/mysite.com/public_html/oc-includes/osclass/model/Category.php:293
Stack trace:
#0 /home/mysite.com/public_html/oc-includes/osclass/model/Category.php(76): Category->toTree()
#1 /home/mysite.com/public_html/oc-includes/osclass/model/Category.php(42): Category->__construct()
#2 /home/mysite.com/public_html/oc-includes/osclass/model/Item.php(1237): Category::newInstance()
#3 /home/mysite.com/public_html/oc-includes/osclass/model/Item.php(153): Item->extendDataSingle()
#4 /home/mysite.com/public_html/oc-content/plugins/instant_messenger/user/create_thread.php(16): Item->findByPrimaryKey()
#5 /home/mysite.com/public_html/oc-includes/osclass/helpers/hTheme.php(45): include('...')
#6 /home/mysite.com/public_html/oc-content/themes/epsilon/custom.php(20): osc_render_file()
#7 /home/mysite.com/public_html/oc-includes/osclass/helpers/hDefines.php(460): require('...')
#8 /home/mysite.com/public_html/oc-includes/osclass/controller/custom.php(88): osc_current_web_theme_path()
#9 /home/mysite.com/public_html/oc-includes/osclass/controller/custom.php(74): CWebCustom->doView()
#10 /home/mysite.com/public_html/index.php(277): CWebCustom->doModel()
#11 {main}
  thrown in /home/mysite.com/public_html/oc-includes/osclass/model/Category.php on line 293
[19-Apr-2023 00:26:25 Indian/Maldives] PHP Deprecated:  number_format(): Passing null to parameter #1 ($num) of type float is deprecated in /home/mysite.com/public_html/oc-content/plugins/user_rating/functions.php on line 305
[19-Apr-2023 00:26:25 Indian/Maldives] PHP Deprecated:  round(): Passing null to parameter #1 ($num) of type int|float is deprecated in /home/mysite.com/public_html/oc-content/plugins/user_rating/functions.php on line 72
[19-Apr-2023 00:26:25 Indian/Maldives] PHP Deprecated:  round(): Passing null to parameter #1 ($num) of type int|float is deprecated in /home/mysite.com/public_html/oc-content/plugins/user_rating/functions.php on line 188
[19-Apr-2023 00:26:25 Indian/Maldives] PHP Deprecated:  number_format(): Passing null to parameter #1 ($num) of type float is deprecated in /home/mysite.com/public_html/oc-content/plugins/user_rating/functions.php on line 396

  thrown in /home/mysite.com/public_html/oc-includes/osclass/model/Category.php on line 293
[19-Apr-2023 00:26:33 Indian/Maldives] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /home/mysite.com/public_html/oc-includes/osclass/model/Category.php:293
Stack trace:
#0 /home/mysite.com/public_html/oc-includes/osclass/model/Category.php(76): Category->toTree()
#1 /home/mysite.com/public_html/oc-includes/osclass/model/Category.php(42): Category->__construct()
#2 /home/mysite.com/public_html/oc-includes/osclass/helpers/hSearch.php(508): Category::newInstance()
#3 /home/mysite.com/public_html/oc-includes/osclass/controller/search.php(214): osc_search_url()
#4 /home/mysite.com/public_html/index.php(235): CWebSearch->doModel()
#5 {main}
  thrown in /home/mysite.com/public_html/oc-includes/osclass/model/Category.php on line 293
[19-Apr-2023 00:26:33 Indian/Maldives] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /home/mysite.com/public_html/oc-includes/osclass/model/Category.php:293
Stack trace:
#0 /home/mysite.com/public_html/oc-includes/osclass/model/Category.php(76): Category->toTree()
#1 /home/mysite.com/public_html/oc-includes/osclass/model/Category.php(42): Category->__construct()
#2 /home/mysite.com/public_html/oc-includes/osclass/helpers/hSearch.php(508): Category::newInstance()
#3 /home/mysite.com/public_html/oc-includes/osclass/controller/search.php(214): osc_search_url()
#4 /home/mysite.com/public_html/index.php(235): CWebSearch->doModel()
#5 {main}
  thrown in /home/mysite.com/public_html/oc-includes/osclass/model/Category.php on line 293
[19-Apr-2023 00:26:33 Indian/Maldives] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /home/mysite.com/public_html/oc-includes/osclass/model/Category.php:293
Stack trace:
#0 /home/mysite.com/public_html/oc-includes/osclass/model/Category.php(76): Category->toTree()
#1 /home/mysite.com/public_html/oc-includes/osclass/model/Category.php(42): Category->__construct()
#2 /home/mysite.com/public_html/oc-includes/osclass/helpers/hSearch.php(508): Category::newInstance()
#3 /home/mysite.com/public_html/oc-includes/osclass/controller/search.php(214): osc_search_url()
#4 /home/mysite.com/public_html/index.php(235): CWebSearch->doModel()
#5 {main}
  thrown in /home/mysite.com/public_html/oc-includes/osclass/model/Category.php on line 293
[19-Apr-2023 00:26:33 Indian/Maldives] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /home/mysite.com/public_html/oc-includes/osclass/model/Category.php:293
Stack trace:
#0 /home/mysite.com/public_html/oc-includes/osclass/model/Category.php(76): Category->toTree()
#1 /home/mysite.com/public_html/oc-includes/osclass/model/Category.php(42): Category->__construct()
#2 /home/mysite.com/public_html/oc-includes/osclass/helpers/hSearch.php(508): Category::newInstance()
#3 /home/mysite.com/public_html/oc-includes/osclass/controller/search.php(214): osc_search_url()
#4 /home/mysite.com/public_html/index.php(235): CWebSearch->doModel()
#5 {main}


*

MB Themes

Re: How to implement Redis caching in osclass
« Reply #3 on: April 19, 2023, 01:36:24 PM »
You may reach [email protected] with request for help, provide FTP details and URL and will debug and identify if there is something wrong.
It's expected there is just small piece missing.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots