*

Wiz

  • ****
  • 138 posts
Re: Memcache(d) Questions and Issues
« Reply #15 on: December 14, 2022, 09:35:29 AM »
Maybe you can share your file Object_Cache_memcache.php file together with samole config enrry and can be added into next version  ;)

I already did, as a zip file, in my previous post   8)

I'll start another thread and include both versions of the updated classes.

*

dsf

  • *****
  • 261 posts
Re: Memcache(d) Questions and Issues
« Reply #16 on: December 14, 2022, 03:45:21 PM »
Wiz,

That latest fix (line 195) does the job.

I see no errors and also i see "Cache: Enabled (memcached)".

Thank you so much. I will test further in the staging site ....

Do you know if multiple Osclass sites hosted in the same plan (hosting space) can use that?

*

dsf

  • *****
  • 261 posts
Re: Memcache(d) Questions and Issues
« Reply #17 on: December 14, 2022, 04:11:15 PM »
Wiz and MB Themes:

I asked the hosting support if multiple Osclass can use that (same plan). And here is their reply:

Quote
It would take some investigation and tweaking by your webmaster. Each instance/site will also need a separate key so the caching does not conflict.

So i guess something more is needed. Something like this, i see in other scripts using memecached:

Quote
supplementary_cache_options➡prefix:

The value specified here will be prepended to all cache entry keys. Default = "prefixsomething_". When multiple installations exist at the same server, this can be useful for keeping their caches separate from each other.

Still, i'm not a developer. You should know all about this and test further.

*

Wiz

  • ****
  • 138 posts
Re: Memcache(d) Questions and Issues
« Reply #18 on: December 14, 2022, 10:12:12 PM »
Wiz and MB Themes:

I asked the hosting support if multiple Osclass can use that (same plan). And here is their reply:

Quote
It would take some investigation and tweaking by your webmaster. Each instance/site will also need a separate key so the caching does not conflict.

So i guess something more is needed. Something like this, i see in other scripts using memecached:

Quote
supplementary_cache_options➡prefix:

The value specified here will be prepended to all cache entry keys. Default = "prefixsomething_". When multiple installations exist at the same server, this can be useful for keeping their caches separate from each other.

Still, i'm not a developer. You should know all about this and test further.

Not possible with memcache and memcached as they don't support partitioning / multiple namespaces so only solution is to run multiple instances of either ... for multiple sites on single caching instance, you'll need redis or similar caching stores

*

dsf

  • *****
  • 261 posts
Re: Memcache(d) Questions and Issues
« Reply #19 on: December 14, 2022, 10:28:15 PM »
Wiz,

Correct, that memcache does not support partitioning. However you can do it in the site. What you would do is prefix any entry added with a unique prefix to each site.

memchached provides guidance on this: https://github.com/memcached/memcached/wiki/ProgrammingTricks

As i posted above. A prefix .....

*

Wiz

  • ****
  • 138 posts
Re: Memcache(d) Questions and Issues
« Reply #20 on: December 15, 2022, 07:40:43 AM »
Wiz,

Correct, that memcache does not support partitioning. However you can do it in the site. What you would do is prefix any entry added with a unique prefix to each site.

memchached provides guidance on this: https://github.com/memcached/memcached/wiki/ProgrammingTricks

As i posted above. A prefix .....

Possible, yes, but not so easy as that requires modifying multiple core files. Better hire a developer if you really needed the added functionality or simply find a hosting company that offers multiple memcached instances  or root access.

*

dsf

  • *****
  • 261 posts
Re: Memcache(d) Questions and Issues
« Reply #21 on: December 16, 2022, 12:16:35 AM »
Wiz,

Do you know if memcached works with Osclass multisite installation?

Thanks

*

Wiz

  • ****
  • 138 posts
Re: Memcache(d) Questions and Issues
« Reply #22 on: December 17, 2022, 04:56:48 AM »
I don't think multisite is working properly in osclass

*

MB Themes

Re: Memcache(d) Questions and Issues
« Reply #23 on: December 17, 2022, 07:44:04 AM »
I think cache entries keys will get subdomain in it, so it should be ok.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Wiz

  • ****
  • 138 posts
Re: Memcache(d) Questions and Issues
« Reply #24 on: December 17, 2022, 09:27:17 AM »
I think cache entries keys will get subdomain in it, so it should be ok.

Yes, for sub-domains it works and I can confirm this but he was asking about multisite .. sub-domain != multisite and multisite functionality is currently non-functional in osclass

*

MB Themes

Re: Memcache(d) Questions and Issues
« Reply #25 on: December 17, 2022, 11:22:47 AM »
Well it's quite confusing some times, but basically osclass has:
- multisite
- subdomain split installation (by user, category, country, region or city).

For multisite, it is possible to define also other sites related to this installation and we've been restoring one table that was missing for this in 8.0.3
Code: [Select]
CREATE TABLE %st_site (
      s_site VARCHAR(255) NOT NULL,
      s_site_mapping VARCHAR(255) NULL,
      fk_i_user_id INT(10) UNSIGNED NULL,
      s_db_name VARCHAR(64) NULL,
      s_db_host VARCHAR(255) NULL,
      s_db_user VARCHAR(64) NULL,
      s_db_password VARCHAR(255) NULL,
      s_upload_path VARCHAR(255) NULL,
      dt_date DATETIME NULL,

      PRIMARY KEY (s_site)
    ) ENGINE=InnoDB DEFAULT CHARACTER SET 'UTF8' COLLATE 'UTF8_GENERAL_CI';

Honestly I was never testing this, but it sounds like it could be great feature ;)


I am also not sure if it is expected that this table will be on DB_TABLE_PREFIX or is above that.
Only info I found:
Your config.php file the database configuration where the configuration for the Osclass sites are saved.
- It matches the url is trying to load with one of the ones that are in the database
- The rest of it woks as a standalone Osclass. It doesn't have a super admin to control all the Osclass yet.
« Last Edit: December 17, 2022, 02:13:01 PM by MB Themes »
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

MB Themes

Re: Memcache(d) Questions and Issues
« Reply #26 on: December 17, 2022, 10:39:41 PM »
I've been checking that multisite feature bit more.
It looks when you want to run multiple sites, but using just one database, there come multisite.
You define site in t_site table with relevant database details and mapping.
But, its not superclear to me why not just to update config.php.... probably would need testing.

What mske sense to me and what seems to be standard for multisite is prestashop model, that allows you to manage multiple osclass installations from one backoffice.

Question is, how many people runs mire than 2-3 osclass siyes and would actually benefit out of such feature.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Wiz

  • ****
  • 138 posts
Re: Memcache(d) Questions and Issues
« Reply #27 on: December 18, 2022, 03:41:00 AM »
Question is, how many people runs mire than 2-3 osclass siyes and would actually benefit out of such feature.

Not many and probably those needing to add and manage expanded and full-featured verticals such as Jobs, Vehicles or Properties etc. to their general classifieds platform and sharing users and ancillary services across such verticals.

I actually reached out to you some time back to try to get multisite working and had created the missing table but never managed to get it working properly as the platform was always erroring out with a 50x error as soon as the "multisite" config option was enabled in config.php
« Last Edit: December 18, 2022, 03:45:01 AM by Wiz »

*

MB Themes

Re: Memcache(d) Questions and Issues
« Reply #28 on: December 18, 2022, 12:55:49 PM »
Right, as it use metadata DB that is not used by anything else..besides that I reviewed source code and only found that this table allows to use different DB than one in config.php.
Basically looks like solution to use 1 DB for multiple sites and have correct links etc.

I've been testing and it seems that metadata conne tion might not work properly as it was reporting that connection is already closed.

Besides same DB, files on hosting must be identical and not sure what was expectation when you create listing on site A, how it will look like on site B, as this site does not have related assets like images.

I think, based on github comments, it should be working somewhere between 3.0 and 3.3, could make sense to test these with some old Php & db versions if it really worked and how...

Right now it seems to be it would make sense to remove this from core, focus more on subdomain based setup & functionality (numerous updates in 8.0.3) and consider this feature in future but in way of connecting backoffice of osclass installations.
« Last Edit: December 18, 2022, 12:57:42 PM by MB Themes »
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Wiz

  • ****
  • 138 posts
Re: Memcache(d) Questions and Issues
« Reply #29 on: December 18, 2022, 08:05:03 PM »
Right now it seems to be it would make sense to remove this from core, focus more on subdomain based setup & functionality (numerous updates in 8.0.3) and consider this feature in future but in way of connecting backoffice of osclass installations.

Couldn't agree more especially with having sub-domain specific listings posted under their respective sub-domains ie. listing posted with region or city A selected should show under country and/or region/city A but not under region/city B which is currently the case. Same goes for search, searching under region / city A sub-domain should only yield region / city A results.

Cheers