UniversityRadioYork / MyRadio

University Radio York's back-end radio management system
https://ury.org.uk/myradio
16 stars 16 forks source link

Changing the cutoff of an existing training session doesn't update cache #1077

Closed markspolakovs closed 2 years ago

markspolakovs commented 2 years ago

You can type in a new value on the editDemo screen, but it'll go back to the old one when you save.

markspolakovs commented 2 years ago

Actually it does, and this is a caching issue (#1054) - compare DB vs cache:

+-------+-----------------+---------------------------------+---------+--------+-------------------+----------------+
|demo_id|presenterstatusid|demo_time                        |demo_link|memberid|signup_cutoff_hours|max_participants|
+-------+-----------------+---------------------------------+---------+--------+-------------------+----------------+
|130    |1                |2022-10-04 14:15:00.000000 +00:00|         |11090   |1                  |2               |
+-------+-----------------+---------------------------------+---------+--------+-------------------+----------------+
php > var_dump($mc->get('MyRadioCache-MyRadio\ServiceAPI\MyRadio_Demo-130'));
object(__PHP_Incomplete_Class)#2 (9) {
  ["__PHP_Incomplete_Class_Name"]=>
  string(31) "MyRadio\ServiceAPI\MyRadio_Demo"
  ["demo_id":"MyRadio\ServiceAPI\MyRadio_Demo":private]=>
  int(130)
  ["demo_time":"MyRadio\ServiceAPI\MyRadio_Demo":private]=>
  string(22) "2022-10-04 15:15:00+01"
  ["demo_link":"MyRadio\ServiceAPI\MyRadio_Demo":private]=>
  string(0) ""
  ["presenterstatusid":"MyRadio\ServiceAPI\MyRadio_Demo":private]=>
  string(1) "1"
  ["memberid":"MyRadio\ServiceAPI\MyRadio_Demo":private]=>
  string(5) "11090"
  ["signup_cutoff_hours":"MyRadio\ServiceAPI\MyRadio_Demo":private]=>
  int(15)
  ["demo_max_participants":"MyRadio\ServiceAPI\MyRadio_Demo":private]=>
  string(1) "2"
  ["change":protected]=>
  bool(false)
}