I'm working in a project that must maintain a lot of records in cache (Apache Ignite), this records are divided by companies.
Ex:
Company; product; quantity
CompA; A; 15
CompA; B; 10
CompB; A; 20
CompB; B; 12
My doubt is about performance between create entries in the same cache appending tenant with key (company + product) and create a new cache for each tenant like:
CacheConfiguration<String, String> cfgCompanyA = new CacheConfiguration<>();
cfgCompanyA.setName("CompanyA");
IgniteCache<String, String> cacheCompanyA = ignite.getOrCreateCache(cfgCompanyA);
CacheConfiguration<String, String> cfgCompanyB = new CacheConfiguration<>();
cfgCompanyB.setName("CompanyB");
IgniteCache<String, String> cacheCompanyB = ignite.getOrCreateCache(cfgCompanyB);