@@ -67,7 +67,10 @@ public function cachePage(Request $request, $content)
67
67
68
68
$ content = $ this ->normalizeContent ($ content );
69
69
70
- $ path = $ this ->getFilePath ($ url );
70
+ $ parsed = parse_url ($ url );
71
+ $ domain = $ parsed ['scheme ' ].':// ' .$ parsed ['host ' ];
72
+ $ site = optional (Site::findByUrl ($ domain ))->handle ();
73
+ $ path = $ this ->getFilePath ($ url , $ site );
71
74
72
75
if (! $ this ->writer ->write ($ path , $ content , $ this ->config ('lock_hold_length ' ))) {
73
76
return ;
@@ -87,8 +90,10 @@ public function preventLoggingRewriteWarning()
87
90
public function getCachedPage (Request $ request )
88
91
{
89
92
$ url = $ this ->getUrl ($ request );
90
-
91
- $ path = $ this ->getFilePath ($ url );
93
+ $ parsed = parse_url ($ url );
94
+ $ domain = $ parsed ['scheme ' ].':// ' .$ parsed ['host ' ];
95
+ $ site = optional (Site::findByUrl ($ domain ))->handle ();
96
+ $ path = $ this ->getFilePath ($ url , $ site );
92
97
93
98
if ($ this ->logRewriteWarning && ! $ this ->isLongQueryStringPath ($ path )) {
94
99
Log::debug ('Static cache loaded [ ' .$ url .'] If you are seeing this, your server rewrite rules have not been set up correctly. ' );
@@ -100,8 +105,11 @@ public function getCachedPage(Request $request)
100
105
public function hasCachedPage (Request $ request )
101
106
{
102
107
$ url = $ this ->getUrl ($ request );
108
+ $ parsed = parse_url ($ url );
109
+ $ domain = $ parsed ['scheme ' ].':// ' .$ parsed ['host ' ];
110
+ $ site = optional (Site::findByUrl ($ domain ))->handle ();
103
111
104
- return File::exists ($ this ->getFilePath ($ url ));
112
+ return File::exists ($ this ->getFilePath ($ url, $ site ));
105
113
}
106
114
107
115
/**
0 commit comments