package Ġorg . dev mp v . tele bot . service Ċ Ċ import Ġmu . Kotlin Logging Ċ import Ġorg . dev mp v . tele bot . client . open weather . Open Weather Client Ċ import Ġorg . dev mp v . tele bot . config . properties . Cache Properties Ċ import Ġorg . dev mp v . tele bot . domain . weather . Weather Report Ċ import Ġorg . dev mp v . tele bot . utils . to Weather Report Ċ import Ġorg . springframework . cache . annotation . Cache Put Ċ import Ġorg . springframework . stereotype . Service Ċ Ċ @ Service Ċ class ĠWeather Cache Service ( ĊĠĠĠ Ġprivate Ġval Ġopen Weather Client : ĠOpen Weather Client Ċ ) Ġ{ ĊĠĠĠ Ġprivate Ġval Ġlogger Ġ= ĠKotlin Logging . logger Ġ{} ĊĊĠĠĠ Ġ@ Cache Put ( cache Names Ġ= Ġ[ Cache Properties . Cache Name . WE ATHER _ CURRENT . name ], Ġkey Ġ= Ġ"# city ") ĊĠĠĠ Ġfun Ġupdate Current Weather ( city : ĠString ): ĠWeather Report ? Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġreport Ġ= Ġopen Weather Client . getOne Call Response ()?. to Weather Report () ĊĠĠĠĠĠĠĠ Ġlogger . debug Ġ{ Ġ" Updating Ġweather Ġcache Ġfor Ġ$ city . ĠReport =$ report " Ġ} ĊĠĠĠĠĠĠĠ Ġreturn Ġreport ĊĠĠĠ Ġ} Ċ } Ċ