I have created some code that directly acesses the database. Namely, the g_summary column of the g2_Item table.
When I change the summary it does not show up in other places where summary is displayed because the database cache is caching the old summary value. E.g. If the old summary was "No hope", and it is replaced by "Hope" in the database , it still shows "No hope" in gallery, but when the mysql cache is cleared in the admin then "Hope" appears.
There are only two was to solve this a) disable or empty the cache programatically each time a direct access to the database is made, or 2) add the new value e.g. "Hope" to the cache, replacing the old one, e.g. "No Hope". Does any one know which of these two solutions is better; and how to implement it in code.