Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Giving/removing an someone from an officership doesn't update the cache #1102

Open
Tracked by #1054
markspolakovs opened this issue Dec 16, 2022 · 1 comment
Open
Tracked by #1054

Comments

@markspolakovs
Copy link
Member

No description provided.

@markspolakovs markspolakovs changed the title Giving/removing an someone from an officership Giving/removing an someone from an officership doesn't update the cache Dec 16, 2022
@markspolakovs
Copy link
Member Author

Notes while investigating this:

  • the officers page in MyRadio has its own cache:
    //Return the object if it is cached
    self::$officers = self::$cache->get('MyRadioProfile_officers');
    if (self::$officers === false) {
    self::wakeup();
    self::$officers = self::$db->fetchAll(
    'SELECT team.team_name AS team, officer.type, officer.officer_name AS officership,
    fname || \' \' || sname AS name, member.memberid, officer.officerid
    FROM team
    LEFT JOIN officer ON team.teamid = officer.teamid AND officer.status = \'c\'
    LEFT JOIN member_officer ON officer.officerid = member_officer.officerid
    AND member_officer.till_date IS NULL
    LEFT JOIN member ON member_officer.memberid = member.memberid
    WHERE team.status = \'c\' AND officer.type != \'m\'
    ORDER BY team.ordering, officer.ordering, sname'
    );
    self::$cache->set('MyRadioProfile_officers', self::$officers);
    }
  • However, it should be getting cleared: MyRadio_Officer::assignOfficer and MyRadio_Officer::standDown both call Profile::clearCache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant