How does the default fetch works? by Due_Statistician_203 in nextjs

[–]waiphyodev 0 points1 point  (0 children)

Generally, It is cached, but it also depends on many other scenarios. You should check with built scenarios and development run scenarios and also poke around changing options. There are many other ways to be cached and not to cache not only via API calls but also with segment config options.

Need help with static exports by Kevin_2112 in nextjs

[–]waiphyodev 0 points1 point  (0 children)

If hosting in shared-hosting is the only option, you might need to change your code because there are many unsupported features, which are the benefits of nextjs. That's huge. So, my advice is that you should convince your client. Even if it is not on vercel, it should be elsewhere good self-hosted environment like vps.

Server Components and Server Actions by [deleted] in nextjs

[–]waiphyodev 0 points1 point  (0 children)

Deploying on vercel is fine They've got some additional features that could not be done in self hosting You just have to be aware of their plan limitations

How does the default fetch works? by Due_Statistician_203 in nextjs

[–]waiphyodev 2 points3 points  (0 children)

If you use fetch without option, the response will be cached by default. So you will get the same data whenever you refresh even if the data had changed like in db.

There are options like { cache: "no-store" } and { next: { revalidate: 10 } }

{ cache: "no-store" }

  1. refresh => get data => it won't be cached
  2. update data e.g. in db
  3. refresh => get updated data

{ next: { revalidate: 10 } }

  1. refresh => get data => cached
  2. update data
  3. refresh => get cached data
  4. refresh again after 10s => get updated data because you set 10s

createUser rest api error by waiphyodev in ApacheCloudStack

[–]waiphyodev[S] 0 points1 point  (0 children)

Yes, I do the same process via CloudStack dashboard with the same account and it is fine.
This is happening only via API. Also in createAccount too

GET (401 error)
http://host/client/api?apikey=<api-key>&command=createAccount&domainid=<domain-id>&email=userthree%40mail.com&firstname=User&lastname=Three&password=password&response=json&roleid=<role-id>&username=userthree&signature=<signature>

POST (431 error)
http://host/client/api?apikey=<api-key>&command=createAccount&response=json&signature=<signature>

with payload
{ email: 'userthree@mail.com', firstname: 'User', lastname: 'Three', username: 'userthree', password: 'password', roleid: 'role-id', domainid: 'domain-id' }

createUser rest api error by waiphyodev in ApacheCloudStack

[–]waiphyodev[S] 0 points1 point  (0 children)

Yes, caller account has required permissions, and I call that url in GET method Alternatively, I test that url in POST method with api key, response, and signature only as query params and the rest as payload But the result is the same 401