What version of FS are you using?
Does the same thing happen if you use LUA?  Maybe you can try a LUA example script to rule out an issue in JS.  
Does your code use any closures that may be causing the appearance of cached data?
What about the sqlite command line tool?




On Tue, Dec 13, 2016 at 1:56 PM, Aqs Younas <aqsyounas@gmail.com> wrote:
I should have provided more info. 
Yes, this is a separate SQLite database being shared with FreeSWITCH. Below is the javascript code snippet accessing database and querying the records. 

var coreDbFile = "/opt/db/db.db"  // This is a sparate database then freeswitch core database having custome tables only. 
var db = new CoreDB(coreDbFile);
sql = "SELECT * FROM pool_campaigns_view WHERE pool_id = '" + 65 + "'";
db.prepare(sql);
while(db.next()) {
hash = db.fetch();
console_log("info", "Campaign ID: " + hash['campaign_id'] + ", Weight: " + hash['weight']);
}
Sorry if there was something inappropriate in previous email and also not clear what type of logs i should provide for this. 

On 13 December 2016 at 23:58, Anthony Minessale <anthony.minessale@gmail.com> wrote:
Which data do you mean exactly?

You said you use sqlite but its a different db than FS core.  So is this extra sqlite db being shared with FS?  How is FS accessing it.
Its not really clear enough of an explanation to understand fully.


On Tue, Dec 13, 2016 at 12:46 PM, Aqs Younas <aqsyounas@gmail.com> wrote:
Thanks for replying. We are not caching data it is just a simple select query and logging in the console. 

On 13 December 2016 at 23:39, Michael Jerris <mike@jerris.com> wrote:
I can’t think of anyplace we would be caching data unless its somewhere in your js code that you are caching results.


> On Dec 13, 2016, at 1:35 PM, Aqs Younas <aqsyounas@gmail.com> wrote:
>
> Hi,
> We are using SQLite(separate database than core) with javascript and have observed a bizarre issue. Freeswitch query (Select) shows old records whereas data was changed a few minutes before.
>
> Sometimes updated data reflects back in FreeSWITCH after several minutes.  Whereas in PHPadmin I see updated data for the query.
> I have asked the question on IRC where they advised me to change the database.
>
> Is there any workaround for this? Does freeswich caches data from sqlite?
>
> Sorry for asking again, we have a system in production doing some sqlite select queries, changing database would be the last option.
>
> Best,
> Aqs Younas


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



--

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



--
Anthony Minessale II       ♬ @anthmfs  ♬ @FreeSWITCH  ♬

ClueCon Weekly Development Call 
☎ sip:888@conference.freeswitch.org  ☎ +19193869900