0

There are a lot of discussions on this topic but I'd like to ask this question anyways to determine the best approach for my specific situation...

I'm using the linkedIn API with CakePHP. From the LinkedIn API I get an XML object. I would like to store this XML objects (the whole thing) in a session variable so I do not have to call the API on every page. My understanding is that it's not possible to store XML objects in a PHP Session. What is the usual workaround for this?

I've already written a lot of code that reads/manipulates the XML objects, so I'd like to avoid turning the object into an array or something else so that I do not need to rewrite this code.

Many Thanks

3 Answers 3

4

Why don't you store the XML object as an XML string? Radical, I know.

Sign up to request clarification or add additional context in comments.

Comments

0

What about writing the XML to a temp file with the session id as the filename?

Comments

0

You could save the XML in a file or in the database.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.