[SOLVED] reload union objects from database

All Union Platform questions, comments, feature requests, and bug reports.

reload union objects from database  

Postby niraj » Wed 21 Aug 2013 14:07

We are using mysql database wth union
we have a huge web app that needs to change database values
eg. points when user land to user site.

we update mysql database directly (with out trying to connect union server via php)
the problem is the values @ union server does not change (read latest from db) until union server is restarted

is there a way to clean cache (hibernate's evict ) for union objects .
we tried

Code: Select all
<property name="hibernate.cache.use_query_cache">false</property>
<property name="hibernate.cache.use_second_level_cache">false</property>

in uhibernate.cfg.xml but does not help
niraj
 
Posts: 6
Joined: Sun 16 Sep 2012 21:03

Re: reload union objects from database

Postby paala » Fri 23 Aug 2013 06:37

In my app i use client Attributes with flag persistent , like in the tutorial.
If i manually change a value in mysql , this value is reflected automatically in union server
paala
 
Posts: 13
Joined: Mon 01 Apr 2013 03:40

Re: reload union objects from database

Postby Armand » Tue 08 Oct 2013 02:35

I noticed this problem too.

If an attribute is changed in the database, the change may or may not be picked by Union, depending on its cache status.

Temporary workaround: make sure db changes are made through Union, not directly (may not be always feasible).

A "clear cache" admin command would work miracles.
Armand
 
Posts: 11
Joined: Mon 12 Mar 2012 04:10

Re: reload union objects from database

Postby derek » Thu 24 Oct 2013 22:39

Hey guys,

Would the ability to clear the cache such that the next time an account is logged-in you could guarantee that the data was retrieved from the datasource be very helpful even if it did not automatically synchronize any active accounts? Examples:

Example 1

  • Client logs into account.
  • Client logs out of account.
  • Third-party changes made to persistent attributes of the client.
  • Cache is cleared.
  • Client logs into account and changed persistent attributes are retrieved from the database.

Example 2

  • Client logs into account.
  • Third-party changes made to persistent attributes of the client.
  • Cache is cleared.
  • Client still shows the pre-change attributes.
  • Client logs out of account.
  • Client logs into account and changed persistent attributes are retrieved from the database.

Thanks,

Derek
derek
 
Posts: 68
Joined: Mon 17 Oct 2011 19:12

Re: reload union objects from database

Postby Armand » Fri 25 Oct 2013 13:34

Hi Derek,

yes, the mechanism would be satisfactory. It would solve a lot of headaches.
Armand
 
Posts: 11
Joined: Mon 12 Mar 2012 04:10

Re: reload union objects from database

Postby derek » Wed 20 Nov 2013 22:25

derek
 
Posts: 68
Joined: Mon 17 Oct 2011 19:12

Re: reload union objects from database

Postby cripito » Tue 23 Sep 2014 12:43

Hey derek

There is any way to launch a ATTR_CHANGE event when 3rd party modify the database?

regards
saul
cripito
 
Posts: 13
Joined: Sun 15 Jul 2012 11:54


Return to Union Platform

Online

Users browsing this forum: No registered users and 2 guests