Jump to content

Referrals and guest cache


LaCollision
 Share

Go to solution Solved by Matt,

Recommended Posts

Hi Invision,

Something is bothering me with the new referral system on IPS 4.5.

In /Session/Front:

public function init()
{
	/* Get cached page if available */
	$this->checkCached();


	[…]

	/* Set a referral cookie */
	if( \IPS\Settings::i()->ref_on and isset( \IPS\Request::i()->_rid ) )
	{
		\IPS\Request::i()->setCookie( 'referred_by', \intval( \IPS\Request::i()->_rid ), \IPS\DateTime::create()->add( new \DateInterval( 'P1Y' ) ) );
	}

	[…]
}

 

Doesn't it look like that when a page is cached, the referral system doesn't work, as the page is sent before a cookie is set?

 

Thank you,

Link to comment
Share on other sites

  • 3 weeks later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...