• Resolved darkpollo

    (@darkpollo)


    Hi,
    I have a custom code made that saves data into the xprofile of buddypress, and then I check that data before to load the form, and if the user has already completed it, then I redirect it to the home page.
    With redis active, the form is loading always, I imagine this is because the request to get the xprofile data is empty the first time it loads, and then use the cache for that.
    I add this on my wp-config:

    
    define( 'WP_REDIS_IGNORED_GROUPS',  [
        'bp_xprofile',
        'bp_xprofile_data',
        'bp_xprofile_fields',
        'bp_xprofile_groups',
        'xprofile_meta',
    ] );
    

    And now the options on my Redis configuration looks like this:

    
    WP_REDIS_IGNORED_GROUPS: ["bp_xprofile","bp_xprofile_data","bp_xprofile_fields","bp_xprofile_groups","xprofile_meta"]
    Global Groups: [
        "blog-details",
        "blog-id-cache",
        "blog-lookup",
        "global-posts",
        "networks",
        "rss",
        "sites",
        "site-details",
        "site-lookup",
        "site-options",
        "site-transient",
        "users",
        "useremail",
        "userlogins",
        "usermeta",
        "user_meta",
        "userslugs",
        "blog_meta",
        "bp",
        "bp_last_activity",
        "bp_member_type",
        "bp_xprofile",
        "bp_xprofile_data",
        "bp_xprofile_fields",
        "bp_xprofile_groups",
        "xprofile_meta",
        "bp_notifications",
        "notification_meta",
        "bp_groups",
        "bp_group_admins",
        "bp_group_invite_count",
        "group_meta",
        "bp_groups_memberships",
        "bp_groups_memberships_for_user",
        "bp_activity",
        "bp_activity_comments",
        "activity_meta",
        "bp_activity_follow",
        "bp_messages",
        "bp_messages_threads",
        "bp_messages_unread_count",
        "message_meta"
    ]
    Ignored Groups: [
        "bp_xprofile",
        "bp_xprofile_data",
        "bp_xprofile_fields",
        "bp_xprofile_groups",
        "xprofile_meta",
        "counts",
        "plugins",
        "themes"
    ]
    

    Do I need to exclude all those?
    Will this be enough?
    Or I am doing this all wrong?

    Thank you for your help.

    Best regards

    • This topic was modified 4 years, 9 months ago by darkpollo.
Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Till Krüss

    (@tillkruess)

    Hey! Can you post your custom code? That would allow me to provide a better answer.

    Sorry I got distracted… ??
    I have decided to disable the whole redis on this project.
    There is so many clashes with BuddyBoss (BuddyPress) and it is not worth it at this level.

    But thanks!

    @angelfplaza – Hi Angel, have you ever figured this out? Did you completely move away from Redis? We are having this issue with BuddyBoss as well and moving away from Redis seems unrealistic as it will slow down the entire site. Any solution you found?

    No. Buddyboss needs to step up here and help, but their support system did not help at all. They were going to “look into it”.

    So I asked the client if they wanted to invest on this and they say no for now.
    This is a small site so we will review this when the traffic increase.

    I agree with you, but not that much we can do.
    Buddyboss needs to talk with the developers and make sure they test this. Being the man in the middle is not going to work.

    So, my suggestion, go tell Buddyboss support. Eventually they will get it.

    • This reply was modified 4 years, 5 months ago by angelfplaza.
    Plugin Author Till Krüss

    (@tillkruess)

    Agreed.

    The quickest solution is to ignore the related cache groups but still use Redis for everything else.

    @angelfplaza – Couldn’t you theoretically exclude the entire BuddyBoss platform from Redis? It’s not the best solution but at least Redis will take care of the rest.

    @tillkruess – Hi Till, I agree! This is the approach that I am taking.

    Thank you for the suggestions.
    I am not using the exclusion because even that requires testing and some time invested on keeping it working nicely.

    Imho, the whole point to use redis on this website is to help the server on the parts where cache is not that useful, and that is the exactly the buddyboss area.
    So for the client and for me, it does not make sense to invest any resources on excluding the main reason to use redis.
    For that, we just disable the whole thing (Redis) and it keeps everything much simpler.

    When Redis become useful for other parts of the website, then we will revisit the topic. ??

    @angelfplaza – Hi Angel, I just wanted to give you a quick update on this. I did complain to BuddyBoss and it seems like they were able to finally come up with a solution. They should be releasing this fix real soon. I did ask them to provide me with a temporary solution so I can get it going asap. I will share that snippet of code here as well.

    Exclude Profile Field data being cached by Redis Object Cache

    If you need it sooner, another workaround is to suppress the “transient” group as a whole. I know this is probably not ideal but it works for now.

    • This reply was modified 4 years, 5 months ago by thomaschoi.
    • This reply was modified 4 years, 5 months ago by thomaschoi.

    Thank you for the update @thomaschoi !

    When I told them they didn′t have any public github or code at all.
    It is nice to know and I suppose that makes everything more transparent.
    Good one!

    In this case I am going to be the one waiting for others to lead. ??

    But it is good we have the workaround in case we need it.

    Thanks again!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘BuddyBoss (BuddyPress) and Redis with custom form’ is closed to new replies.